LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2010, 08:00 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
need help with a tool?


I am looking for a tool to analyze all the sub-directories and files and publish details in a file format (or on screen so I can copy it) with following details:

* Path of files,
* Size of file,
* Last access or modification dates etc

Any tool which I can download and give it a try?
 
Old 02-12-2010, 08:05 AM   #2
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
man ls
 
Old 02-12-2010, 08:09 AM   #3
rn_
Member
 
Registered: Jun 2009
Location: Orlando, FL, USA
Distribution: Suse, Redhat
Posts: 127
Blog Entries: 1

Rep: Reputation: 25
I'm sorry, i just noticed that you are a "Senior Member" with all those posts and blogs and what not. You probably had something other than 'ls' in mind. Maybe if you can tell us why ls does not serve your purpose, and give details about what you're looking for.
 
Old 02-12-2010, 08:38 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
If a customized output of ls is not enough, as rn_ already pointed out, you can give a try to stat or find. Using find you can take advantage of its recursion capabilities and the search criteria. To print out the information you need, just take a look at the -printf action.
 
Old 02-12-2010, 09:56 AM   #5
jkzfixme
Member
 
Registered: Sep 2006
Location: Orange County, NY
Distribution: Ubuntu, Solaris, Android
Posts: 329
Blog Entries: 21

Rep: Reputation: 52
Im quite fond of the old "duck" or disk usage command , let me know how it works out for you

Quote:
# cd /
# du -ckx | sort -n
you can also try the following

Quote:
$ du -sk * | sort -n
Quote:
$ du -ck | sort -n
Regards,
JKZfixme

Last edited by jkzfixme; 02-12-2010 at 09:59 AM.
 
Old 02-12-2010, 10:15 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681Reputation: 681
Try using "find" with -ls. It gives an output similar to "ls -lR". You can add tests on what you which files and directories to include. Another option is to use -printf or -fprintf. This way you could have total control on what information you provide and it's format.

For example, you could produce text to include in an xml document:
find . -maxdepth 2 -printf '<fileinfo name="%f" owner="%u" pathname="%P" />\n'

You could use find to locate mp3 or ogg files and produce a script of sql commands to enter them in a database.

Last edited by jschiwal; 02-12-2010 at 04:06 PM. Reason: fixup on example.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
im looking for a tool... bruj3w Linux - Networking 1 10-27-2004 09:02 AM
The Best Tool? tearinox Programming 1 11-18-2003 12:32 AM
What is this tool? jonin Linux - Newbie 2 03-24-2003 02:21 AM
URLSCAN tool MS = Linux tool ? OB1 Linux - Security 3 10-05-2002 12:58 AM
where is the tool? shierly Linux - Security 3 02-28-2001 12:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration