?
Solved

AIX directory listing output to a file.

Posted on 2007-10-05
6
Medium Priority
?
980 Views
Last Modified: 2013-12-21
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!
0
Comment
Question by:seis
  • 3
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
nixfreak earned 1000 total points
ID: 20021708
for the given task "ls" is fast. The speed is actually limited by your hard disk speed.

ls -ltr > file
0
 
LVL 46

Assisted Solution

by:Kent Olsen
Kent Olsen earned 1000 total points
ID: 20021791
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
 

Author Comment

by:seis
ID: 20021834
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 46

Expert Comment

by:Kent Olsen
ID: 20021900
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
 

Author Comment

by:seis
ID: 20021937
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
 
LVL 46

Expert Comment

by:Kent Olsen
ID: 20022017


   :)

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question