Unix: Print folder and file structure to a file?

MIDIman

Diamond Member
Jan 14, 2000
3,594
0
0
A bit of a newbie here with Unix.

Is there a command in Unix to print to a text file a specific folder structure (including subdirectories), preferably with all of the files listed within each folder and their size as well?

Thanks in advance.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Yep du will print the size of directories and their files if you use the right command line arguements. And then you use the > to pipe it into a file of your choosing.

For learning around the command line there are a couple guides that are usefull, one is the introduction to linux: hands on linux guide, and the other is the bash scripting guide for beginners. A bit dry and targetted more for the administrator types, but usefull, I beleive. They are from guide section from tldp.org.

Man files are usefull..