DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: need unix ls command to write to file

  1. #1
    Join Date
    Oct 2002
    Location
    Boston
    Posts
    7

    need unix ls command to write to file

    I like to write the contents of ls -l into a file in unix. What is the command.
    Can somebody help.
    I di ls -l>tst.dat
    but it is writting only few file names.
    There are about 2000 files in this directory.

    --Easwran

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    That's the way you do it!

    ls -l > myfile.out
    Jeff Hunter

  3. #3
    Join Date
    May 2002
    Posts
    2,645
    Use ls -la to get a listing of ALL files in your working directory (and ls -la > file.name).

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    and ls -lR to recursively go through sub-directories

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width