Member
Join Date: Aug 2006
Location: USA
|
Hello!
I was wondering if there's a Terminal equivalent of Windows' cmd > dir command. In addition, I was wondering if it was possible to print the results of the directory to a .txt file. |
quote |
‽
|
Quote:
ls -l for a long list ls -R for recursive ls -t for sorting by time or ls -S by size or ls -Sr for size, reverse etc. Try 'man help' for a whole lot of info to swallow. As another example, ls -G colorizes the output. Quote:
E.g., (cd ~; ls -lR > foo.txt) creates a file foo.txt in your home directory with all subdirectories. |
||
quote |
Member
Join Date: Aug 2006
Location: USA
|
Hooray! Many thanks for your help!
|
quote |
Mac Mini Maniac
Join Date: Sep 2005
|
a related command that may be interesting to you is du, short for Disk Usage.
Example output: Code:
Ran-chan:~ yonzie$ du -sch *
75G Desktop
30M Documents
372K Downloads
1,3G Library
0B Movies
6,8G Music
11G Pictures
0B Public
40K Sites
20K hetland.html
4,0K index.php
94G total Get more information in the manual by typing "man du". |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viewing file list on a directory with an index page... | PKIDelirium | Programmer's Nook | 3 | 2006-12-12 11:23 |
The perfect Christmas tree for the larger living room | Dorian Gray | AppleOutsider | 5 | 2006-12-03 18:08 |
Python -- Directory content differences | Wickers | Programmer's Nook | 12 | 2006-03-19 13:32 |
Darwine Requirements | doublem9876 | Third-Party Products | 2 | 2006-02-26 10:58 |
How Can You Reconstruct the File Directory After Disk Utility? | SilverGoat | Genius Bar | 0 | 2005-03-06 08:27 |