need unix ls command to write to file
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: need unix ls command to write to file

Hybrid View

  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,095
    That's the way you do it!

    ls -l > myfile.out
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  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,331
    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