Results 1 to 3 of 3

Thread: [SOLVED] command line: print list of files in a directory to text file

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Atlanta
    Beans
    28
    Distro
    Ubuntu 10.10 Maverick Meerkat

    [SOLVED] command line: print list of files in a directory to text file

    I'm trying to print the out put of ls -a to somefile.txt. Any suggestions on how to accomplish this from the command line?

  2. #2
    Join Date
    Feb 2008
    Location
    Vancouver
    Beans
    25

    Re: command line: print list of files in a directory to text file

    try
    Code:
    ls -R1 /DIR_Name_Here/ > output.txt
    it'll save the output file in your home folder.

  3. #3
    Join Date
    Dec 2007
    Location
    Atlanta
    Beans
    28
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: command line: print list of files in a directory to text file

    Quote Originally Posted by Truedream View Post
    try
    Code:
    ls -R1 /DIR_Name_Here/ > output.txt
    it'll save the output file in your home folder.
    Perfect! Thanks for the quick reply.

Tags for this Thread

Bookmarks

Posting Permissions

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