1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tivo bash prompt commands

Discussion in 'TiVo Series 1 - UK' started by bri_tal, Aug 19, 2011.

  1. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    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 ?
     
  2. SolidTechie

    SolidTechie New Member

    554
    0
    Dec 11, 2002
    Rugeley, Staffs
    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
     
  3. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    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.,
     
  4. drgeoff

    drgeoff New Member

    63
    0
    Nov 10, 2005
    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 :).
     
  5. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    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.
     
  6. TCM2007

    TCM2007 New Member

    3,947
    0
    Dec 25, 2006
    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/
     
  7. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    @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 ?
     
  8. DX30

    DX30 New Member

    226
    0
    May 22, 2005
    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.
     
  9. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    Thanks for the link. I'll explore the options.
     
  10. SolidTechie

    SolidTechie New Member

    554
    0
    Dec 11, 2002
    Rugeley, Staffs
    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
     
  11. spitfires

    spitfires wassock

    724
    0
    Dec 19, 2006
    South Coast, UK
    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:

  12. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    @Solidtechie and Spitfires - Thanks to you both. Will experiment further.
     
  13. inaflap

    inaflap New Member

    2
    0
    May 2, 2013
    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
     
  14. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    From the prompt in a telnet session, try ls /var/hack/. That should list the contents of that folder.
     
  15. bri_tal

    bri_tal New Member

    56
    0
    Sep 21, 2005
    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.
     
  16. spitfires

    spitfires wassock

    724
    0
    Dec 19, 2006
    South Coast, UK
    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.
     
  17. inaflap

    inaflap New Member

    2
    0
    May 2, 2013
    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????
     
  18. mikerr

    mikerr TiVoCentral.co.uk

    2,598
    0
    Jun 2, 2005
    Up North
    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
     
  19. spitfires

    spitfires wassock

    724
    0
    Dec 19, 2006
    South Coast, UK
    Good point, I keep forgetting about your install script Mike :)
     
  20. spitfires

    spitfires wassock

    724
    0
    Dec 19, 2006
    South Coast, UK
    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?
     

Share This Page