TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Main TiVo Forums > TiVo Series 1 - UK
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 08-19-2011, 09:22 AM   #1
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
tivo bash prompt commands

Showing my ignorance here. Could someone please tell me what is the command for displaying all of the directories/ files from a tivo bash prompt over serial connection ?
bri_tal is offline   Reply With Quote
Old 08-19-2011, 10:06 AM   #2
SolidTechie
Registered User
 
Join Date: Dec 2002
Location: Rugeley, Staffs
Posts: 554
The basic command is

ls

but you can add the following switches:
-l long format
-t sort in time order(rather than filename order)
-r reverse the sort order
-a show hidden files

so ls -ltr is my most common usage - lists all files, by time, newest at the end of the list, verbose list
__________________
Regards,

Ian

----
Keep yout TiVo alive with the
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
service
SolidTechie is offline   Reply With Quote
Old 08-19-2011, 10:16 AM   #3
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
Thanks for your reply. However, all I get, using that command is a listing of 2 text files. What I need to see is a listing of all directories, so that I can look at the files within.,
bri_tal is offline   Reply With Quote
Old 08-19-2011, 10:49 AM   #4
drgeoff
Registered User
 
Join Date: Nov 2005
Posts: 63
Quote:
Originally Posted by bri_tal View Post
Thanks for your reply. However, all I get, using that command is a listing of 2 text files. What I need to see is a listing of all directories, so that I can look at the files within.,
The ls command shows the files and directories inside the directory you are in. The pwd command will return the directory you are in. You can change to another directory with the cd command. cd / will take you to the top level directory. cd .. will take you up one level from the directory you are in. cd ../.. will go up two levels etc. cd ../sibling will take you sideways to "sibling" directory - you need to replace "sibling" by the actual name.

Similarly the ls command can show contents of a directory without entering it eg ls /etc/init.d/

The serial connection is irrelevant to your question, but yes this is telnet .

Last edited by drgeoff : 08-19-2011 at 11:02 AM.
drgeoff is offline   Reply With Quote
Old 08-19-2011, 11:04 AM   #5
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
So there would appear to be no equivalent of the dos command dir /s /p ?

My problem is, for example, when someone refers to sysinit.conf, I would have no idea in which directory this file resides.
bri_tal is offline   Reply With Quote
Old 08-19-2011, 11:25 AM   #6
TCM2007
Registered User
 
TCM2007's Avatar
 
Join Date: Dec 2006
Posts: 3,947
ls -R / | more

But I'm not sure you want to do that, there are a lot of files!

Try in

/etc/rc.d/

or

/var/hack/
__________________
Register now to keep your S1 TiVo alive come June 1st:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
TCM2007 is offline   Reply With Quote
Old 08-19-2011, 12:14 PM   #7
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
@TCM2007 - Yep, that command will tell me where particular files are, used with the page down key. Is there a 'find files' command, to simplify matters ?
bri_tal is offline   Reply With Quote
Old 08-19-2011, 01:55 PM   #8
DX30
Registered User
 
Join Date: May 2005
Posts: 212
Here is a list of common linux commands that might help you

http://ss64.com/bash/

Take a look at "find" and see if that does what you want.

One problem however is a lot will depend on which commands have been installed on your TiVo. By default very few were, not even "ls". Since you have "ls" some have obviously been installed but the question is which ones, so you'll have to try it and see.
DX30 is offline   Reply With Quote
Old 08-19-2011, 02:17 PM   #9
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
Thanks for the link. I'll explore the options.
bri_tal is offline   Reply With Quote
Old 08-19-2011, 02:29 PM   #10
SolidTechie
Registered User
 
Join Date: Dec 2002
Location: Rugeley, Staffs
Posts: 554
Using the ls -ltr command, then you will get a listing - but *nix type os's dont really discriminate between files and directories - it's complicated, and not entirely accurate, but trust me for the moment.

Here is a listing from a machine I just happen to be working on right now - it's not a TiVo
Code:
bydarth1:lord > ls -ltr
total 732
-rw-r-----   1 oracle   dba           97 Aug 11  2005 local_setup.arc
-rw-r--r--   1 oracle   dba        14534 Aug 11  2005 logmon_ora600_vader.inc
-rw-r--r--   1 oracle   dba        14448 Aug 11  2005 logmon_ora600_lord.inc
-rwx------   1 oracle   dba          551 Oct 11  2005 oset*
-rwxr-xr-x   1 oracle   dba        14376 Nov 28  2005 local_orarep.02032006*
-rwxr-xr-x   1 oracle   dba        14278 Mar  2  2006 local_orarep.06112006*
-rw-r--r--   1 oracle   dba          877 Sep  5  2006 oracle_lpmon_defs
-r-xr-x---   1 oracle   dba         1128 Sep  5  2006 local_lpmonctl*
drwxr-xr-x   2 oracle   dba          512 Sep  5  2006 lpmon_backup/
Notice the "d" in the last file - it means it's a directory, so you can cd to it, and rerun the listing. The column to the left of the month, tells you the size of the file, in bytes.


For info only - and (mostly)not important on your TiVo
The rwx strings tell you whether it can be read/written/executed by each of three groups from left to right (in this case) Owner(oracle) group(dba) and world(everybody else)- and you don't need to worry much about most of the rest.

Note that filenames are case sensitive in *nix systems, so "CD" won't work, it has to be "cd", and "LS" is not the same as "ls" etc etc
__________________
Regards,

Ian

----
Keep yout TiVo alive with the
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
service

Last edited by SolidTechie : 08-20-2011 at 07:21 AM. Reason: to correct the dreadful spelling, sorry!
SolidTechie is offline   Reply With Quote
Old 08-20-2011, 03:21 AM   #11
spitfires
wassock
 
Join Date: Dec 2006
Location: South Coast, UK
Posts: 703
Here's 'find'.

Usage:
find / -name sysinit.conf

(Make sure you set it to executable if your ftp program doesn't do this. "chmod +x find")
Attached Files
File Type: zip find.zip (27.9 KB, 8 views)
__________________
Tivo since 2002. S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available.
spitfires is offline   Reply With Quote
Old 08-20-2011, 04:50 AM   #12
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
@Solidtechie and Spitfires - Thanks to you both. Will experiment further.
bri_tal is offline   Reply With Quote
Old 05-02-2013, 06:22 AM   #13
inaflap
Registered User
 
Join Date: May 2013
Posts: 2
sorry to revive such an old thread but I have tried the ls command from my telnet program and I get this
Bash /var/hack #ls
bash: ls: command not found

it happens for a number of bash commands I have tried

pwd and dirs work

not really a unix user so have no idea what is going wrong
inaflap is offline   Reply With Quote
Old 05-02-2013, 03:15 PM   #14
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
From the prompt in a telnet session, try ls /var/hack/. That should list the contents of that folder.
bri_tal is offline   Reply With Quote
Old 05-02-2013, 03:36 PM   #15
bri_tal
Registered User
 
Join Date: Sep 2005
Posts: 56
I found TCM2007's suggestion useful, slightly modified such that the results are written to a file thus :-

ls -R / > tivodirectory.txt

This command should create a file in the hack/root directory, named tivodirectory.txt, which lists all of the tivo files within their respective directories.Using ftp, you can then transfer the file to your PC.

Last edited by bri_tal : 05-03-2013 at 09:55 AM.
bri_tal is offline   Reply With Quote
Old 05-03-2013, 03:53 AM   #16
spitfires
wassock
 
Join Date: Dec 2006
Location: South Coast, UK
Posts: 703
Quote:
Originally Posted by inaflap View Post
bash: ls: command not found
Seems you either don't have the 'tivo-bin' files installed, or it's not in your path. (These files are not standard TiVo issue).

What do you get when you type
Code:
 find  /  -name  ls
and
Code:
 echo $PATH

Or self-service
Hack 34 Installing Unix Binaries on TiVo
Hack 31 Copying Unix Binaries to TiVo (although it will be easier for you to use FTP to copy these binaries across if they are not already on your TiVo.
__________________
Tivo since 2002. S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available.
spitfires is offline   Reply With Quote
Old 05-03-2013, 05:45 AM   #17
inaflap
Registered User
 
Join Date: May 2013
Posts: 2
Quote:
Originally Posted by spitfires View Post
Seems you either don't have the 'tivo-bin' files installed, or it's not in your path. (These files are not standard TiVo issue).

What do you get when you type
Code:
 find  /  -name  ls
and
Code:
 echo $PATH
hi and thanks for the reply

here is what I get




Code:
Bash /var/tmp #find  /  -name  ls
bash: find: command not found
Bash /var/tmp #
Bash /var/tmp #echo $PATH
/bin:/sbin:/tvbin:/devbin:/var/hack:/var/hack/bin:/var/hack/tivoweb-tcl:/var/hack/setup
is that helpful????
inaflap is offline   Reply With Quote
Old 05-03-2013, 08:58 AM   #18
mikerr
TiVoCentral.co.uk
 
Join Date: Jun 2005
Location: Up North
Posts: 2,596
Easy way to get tivo-bin without messing with ftp is using my install script:

Code:
http_get -T 0 -C 0 -D . -U http://64.235.229.106:80/install
chmod a+x install
./install tivobin

__________________
TivoCentral.co.uk -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
mikerr is offline   Reply With Quote
Old 05-04-2013, 11:54 AM   #19
spitfires
wassock
 
Join Date: Dec 2006
Location: South Coast, UK
Posts: 703
Good point, I keep forgetting about your install script Mike
spitfires is offline   Reply With Quote
Old 05-04-2013, 12:01 PM   #20
spitfires
wassock
 
Join Date: Dec 2006
Location: South Coast, UK
Posts: 703
Quote:
Originally Posted by inaflap View Post
Quote:
Bash /var/tmp #echo $PATH
/bin:/sbin:/tvbin:/devbin:/var/hack:/var/hack/bin:/var/hack/tivoweb-tcl:/var/hack/setup
is that helpful????
So it looks like you had the binaries at some stage. You could try connecting via ftp and see what's in /devbin.

What's the history: Is it a new install? Is it a TiVo you bought off e$ay?
__________________
Tivo since 2002. S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available.
spitfires is offline   Reply With Quote
Old 05-10-2013, 07:42 AM   #21
Nick1Austin
Registered User
 
Join Date: Dec 2006
Location: Weston-super-Mare
Posts: 18
Quote:
Originally Posted by spitfires View Post
So it looks like you had the binaries at some stage. You could try connecting via ftp and see what's in /devbin.
That's the behaviour of the SiliconDust installer, or at least the version I used did that (around 2003). It creates /devbin, adds it to the path but leaves it empty. I had to ftp the binarys myself and chmod them to add execute priviledge.

During my early forays into the TiVo I used echo * to list the contents of a directory.
Nick1Austin is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 11:08 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |