AIX directory listing output to a file.

I need to get a listing of a directory structure with dates and file sizes output to a file to use as a comparison between a tape backup and restore. Is there a quick way to do a ls -ltr and tree down all the sub directories and output it to a file? Thanks!
seisAsked:
Who is Participating?
 
nixfreakCommented:
for the given task "ls" is fast. The speed is actually limited by your hard disk speed.

ls -ltr > file
0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi seis,

Add an 'R' parameter, which means "Recursively process subdirectories".  The lower case 'r' means "reverse the order of the sort/output".

ls -ltR > file



Good Luck,
Kent
0
 
seisAuthor Commented:
Thanks! I split the points since I needed that "R". I also needed the . files so I used this as my final command:> ls -Raltr > list.txt
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Kent OlsenData Warehouse Architect / DBACommented:
Hi seis,

This question is more "general unix" than AIX/Solaris specific.

Just curious, but did you mean to ask the question in the Solaris forum and entitle it as if it were AIX?


Kent
0
 
seisAuthor Commented:
Since it was a general UNIX question but on a AIX box I should have stopped with the two areas but I figured I would check up to the 3 area it would allow. I have a few Solaris here so I checked that one too...
0
 
Kent OlsenData Warehouse Architect / DBACommented:


   :)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.