Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-28-2006, 03:59 PM   #1
Registered: May 2005
Location: Canada
Distribution: PCLinuxOS 2007
Posts: 274

Rep: Reputation: 30
ls content of a folder

I want to create a txt with my folder content using this command

ls music > mp3list.txt

but it only sorts the song in that folder, it doesnt list the songs inside the folders inside /music... ie. /music/rock will not be sorted..... how do you do that??
Old 09-28-2006, 04:14 PM   #2
Senior Member
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,153

Rep: Reputation: 60
Originally Posted by lonecrow
ls music > mp3list.txt
ls -R music > mp3list.txt
will work.

man ls is your friend.

Old 09-28-2006, 06:12 PM   #3
Registered: May 2005
Location: Canada
Distribution: PCLinuxOS 2007
Posts: 274

Original Poster
Rep: Reputation: 30
thanks man, sorry for the stupid question... I tried with -r but -R did the trick!

should have looked at the man pages first... sry!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
copy content of the folder ashley75 Linux - General 6 04-16-2007 10:50 AM
Deleting folder content Azhrarn Linux - Software 4 04-27-2006 04:07 AM
reading contents of a folder and moving that content mrobertson Programming 0 02-17-2006 08:14 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 02:26 AM
Apache serving content after the content is removed? jrbush82 Linux - Software 6 05-05-2004 04:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration