UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 5th, 2005, 10:24 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Command to see all files

Hi

is there a command which can be used to get a list of all files, including all files in all subdirectories on a given volume?

Thanks

All My Best,
Jeffrey

Reply With Quote
  #2  
Old November 6th, 2005, 04:37 AM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
find /

Reply With Quote
  #3  
Old November 6th, 2005, 10:16 AM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Hi, James--

Thanks

That actually gave a bit too much information. It found everything not only on the main volume, but on all volumes in the /Volumes directory as well.

So here's what I actually need: To see all files in a given volume "foo", along with the modification date and size of each file.

Is that possible?

Thanks again

All My Best,
Jeffrey

Reply With Quote
  #4  
Old November 6th, 2005, 12:34 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
oh sorry.

if it's a partition you have mounted, find /mnt/partition.

eg. for a cd drive (on my fedora system) i would do find /media/cdrom

it's a wee bit more complex for an arbitrary unmounted device (/dev/blah) but we can work that if you need it.

Apologies for not reading the question properly

Reply With Quote
  #5  
Old November 6th, 2005, 02:04 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Hi--

Not at all... my apologies for not asking it properly the first time

Ok. I now have a bit more information. It looks like ls -R with some other options might do it as well. The situation is that I have a startup drive, and an attached firewire device which shows up in my volumes directory (which the startup drive does as well). So what's happening is that either method is displaying all the files from both volumes. So I guess what I need is a way to ask for all directories except for the /volumes directory, and display the mod. date/time and filesize -- or maybe I'm not understanding again....?

Thanks again

All My Best,
Jeffrey

Last edited by groundlevel : November 6th, 2005 at 02:11 PM.

Reply With Quote
  #6  
Old November 6th, 2005, 02:28 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
ls has the -l switch to get that info

ls -Rl --ignore="/volumes/*"

Reply With Quote
  #7  
Old November 6th, 2005, 02:56 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Hi--

When I try that command,

ls -Rl --ignore="/volumes/*"

I get:

ls: illegal option -- -

Have I entered it incorrectly...?

All My Best,
Jeffrey

Reply With Quote
  #8  
Old November 6th, 2005, 03:35 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
now i'm confused...
Code:
[root@mental-anguish proc]# ls --help | grep ignore
  -B, --ignore-backups       do not list implied entries ending with ~
  -I, --ignore=PATTERN       do not list implied entries matching shell PATTERN


should work you see.

try ls -Rl -I "/volumes/*"

Unless you used an `eye` instead of an `ell`? the first in that is an ell and the second an eye.

Reply With Quote
  #9  
Old November 6th, 2005, 05:22 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Yeh, me too

Ok, that last doesn't work either:

ls: illegal option -- I

I believe this is due to my being on Darwin.

Perhaps some option used with find would do it?

All My Best,
Jeffrey

Reply With Quote
  #10  
Old November 6th, 2005, 05:42 PM
LinuxPenguin's Avatar
LinuxPenguin LinuxPenguin is offline
fork while true;
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: May 2005
Location: England, UK
Posts: 5,535 LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)LinuxPenguin User rank is General (90000 - 100000 Reputation Level)  Folding Points: 11590 Folding Title: Novice Folder
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1008
oh, darwin uses different switches to most unixes.

i dont have a copy to play about with. Might i suggest `man ls` though?

Reply With Quote
  #11  
Old November 6th, 2005, 10:00 PM
groundlevel groundlevel is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 200 groundlevel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 50 sec
Reputation Power: 6
Heh. tried it

It's the same man unfortunately, not Darwin specific.

However, it looks like I have found a partial solution to what I need:

find -x / -ls

Pretty much does it. The only thing I would need to add to get what I want is to have the results sorted by the modification time/date.

Maybe someone knows the correct option(s) to do that?

Thanks

All My Best,
Jeffrey

Last edited by groundlevel : November 6th, 2005 at 10:13 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Command to see all files


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |