![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Traverse a flatfile and check for errors | aravindc | Shell Programming and Scripting | 1 | 04-17-2008 02:56 AM |
| Using File Descriptors, traverse a list | MaestroRage | UNIX for Dummies Questions & Answers | 2 | 02-12-2008 07:05 PM |
| Traverse catalogs | baghera | Shell Programming and Scripting | 3 | 08-30-2007 09:29 AM |
| Traverse Directory Tree for backup | srmadab | Shell Programming and Scripting | 1 | 09-11-2006 06:16 PM |
| Unix File System performance with large directories | dive | UNIX for Dummies Questions & Answers | 3 | 03-12-2004 05:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Fastest way to traverse through large directories
Hi!
I have thousands of sub-directories, and hundreds of thousands of files in them. What is the fast way to find out which files are older than a certain date? Is the "find" command the fastest? Or is there some other way? Right now I have a C script that traverses through and checks each file. But it is taking forever to run! Can somebody tell me a better way? Thanks |
|
||||
|
Thanks
Ok thanks for clearing that up. I am working on teaching myself unix and grep/awk/sed and different things like that so i bring up questions on here of possible solutions to problems and then ppl can correct me and explain why and it helps ALOT. So thank you.
|
|
||||
|
Hi Guys,
Thanks for your input... From what I hear here, I guess that the way I've taken is the best. The C program is pretty fast, but then, with the hundreds of thousands of files, I'm looking for greased lightning. Every day about 20,000 files get added. I'm supposed to archive the old files (those older than 60 days). Sixty days means about 1.2 million files, with the rate growing as time goes by. I guess one way to beat the large number of files is to go deeper down the file structure. But then, I'll have to run the application multiple times, one for each folder path that I select. Just to complete the picture, the list of files older than 60 days is then fed to NetBackup (that archiving application from Symantec). NetBackup then moves the files to tape. I use Netbackup because it becomes easy to restore particular files whenever I need them. |
![]() |
| Bookmarks |
| Tags |
| mtime |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|