Question about ls

Erik Bågfors zindar at gmail.com
Thu Mar 3 07:56:28 UTC 2005


To get only the directories, do
find /path/to/music -type d 

add "-ls" if you want it in a "ls"-like format.

Regards,
Erik


On Thu, 03 Mar 2005 08:43:53 +0100, Bernhard <berndl81 at gmx.at> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi everyone.
> 
> I just tried to list all the audio-cds that I have already converted
> into ogg format. I looked at the ls, which should do the job I guess,
> however I am running into minor problems
> 
> ls -R /path/to/music > mymusic.txt
> 
> lists recursively all the subdirectories in my music path as expected.
> What I want is, that only the existing subdirectories are listed, but
> not the actual content of the subdirectories.
> 
> Looking at the man page didn't help me much. I found the -d option,
> which just doesn't seem to work with the -R option. So
> 
> ls -d -R /path/to/music -> mymusic.txt
> 
> just writes the subdirectories in the path, but not recursively. Any
> hints? Thanks a lot in advance...
> 
> Greets,
> Bernhard
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (GNU/Linux)
> 
> iD8DBQFCJsA5q4oeGfO4V7cRAkw+AKDgt+lkKlqZWQ5b3c4sECQAFOeEJwCgjpqP
> d2PtHkMauSDS07ScKKBOghM=
> =sjxw
> -----END PGP SIGNATURE-----
> 
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list