#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    finland
    Posts
    3
    Rep Power
    0

    Question output a dir's filenames to a txt file


    how can i make a one-name-per-line text file from the filenames of a directory? thanks for any help

    Luke

    PS I know it uses sed or something, but my attempts are not working!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Posts
    174
    Rep Power
    19
    probably no help and you know it already

    make file /my/dir/whatever.txt

    #cd mydir for list
    #script /my/dir/whatever.txt
    #ls

    lists

    then format


    newbie way but all i can say
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    1
    Rep Power
    0

    dir contents to file


    ls -1 > myfile.txt

    may be irix specific - check your man page:

    man ls
  6. #4
  7. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    27
    Rep Power
    0

    output a dir's filenames to a txt file


    to get a one-name-per-line text file from the filenames of a directory, you can do this :

    ls /path/to/dir/ > /path/to/dir/filenames.txt

    That should do it.

    -Eric

IMN logo majestic logo threadwatch logo seochat tools logo