- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Unable to delete 10 million tiny files in a di...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 02:20 AM
04-02-2015 02:20 AM
Unable to delete 10 million tiny files in a directory
Hi
Unfortunately I have run out of inodes, on my file system, in which there is a subdirectory with almost 10 million tiny files (3 digit size).
I have created a script with two references (Jan to March), the script seems to be working, but at the same time, someone is sending files to the very same directory.
Can someone help me into delete files in a faster way......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 10:50 AM
04-02-2015 10:50 AM
Re: Unable to delete 10 million tiny files in a directory
The only faster way is to delete the whole filesystem. ;-)
Or next time you create them, tar them up into much bigger files every so often.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2015 11:32 PM
04-02-2015 11:32 PM
Re: Unable to delete 10 million tiny files in a directory
I did not create them, they are being sent from another system. If I boot in single user mode, and just mount that file system, will "rm -rf" being faster?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2015 05:33 AM
04-03-2015 05:33 AM
Re: Unable to delete 10 million tiny files in a directory
>they are being sent from another system.
Create a local job that tars the up when finished.
>If I boot in single user mode, and just mount that file system, will "rm -rf" being faster?
I'm not sure that will help much, is there any other activity on that filesystem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2015 10:33 AM
04-03-2015 10:33 AM
Re: Unable to delete 10 million tiny files in a directory
Nothing is going on in that file system, apart from that directory being receiveing files (3 digit size files).
Last night I try to
tar cvf optima.tar *.csv
But that also failed..
But if tar were successfully would´nt be the original files still be sitting there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2015 11:56 AM
04-03-2015 11:56 AM
Re: Unable to delete 10 million tiny files in a directory
>tar cvf optima.tar *.csv
>that also failed
Command line too long?
>if tar were successfully wouldn't be the original files still be sitting there?
Yes, you would continually remove them as you created each tarfile.
(All this assumes you want to keep the data.)
>two references (Jan to March), the script seems to be working
I forgot to ask, are you using the faster: find ... -exec rm -f {} +.
Or just the slow: find ... -exec rm -f \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2015 10:49 PM
04-05-2015 10:49 PM
Re: Unable to delete 10 million tiny files in a directory
I am using the
find . -type f -mtime +30 -exec rm -f {} +
as command line, and in the script I am also using
-exec rm -f {} +
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2015 12:29 AM
04-06-2015 12:29 AM
Re: Unable to delete 10 million tiny files in a directory
>find . -type f -mtime +30 -exec rm -f {} +
Then you can't improve that find/rm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2015 12:47 AM
04-06-2015 12:47 AM
Re: Unable to delete 10 million tiny files in a directory
You mean, I should have either the script running or just the find/rm command? Not both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2015 01:13 AM - edited 04-06-2015 01:13 AM
04-06-2015 01:13 AM - edited 04-06-2015 01:13 AM
Re: Unable to delete 10 million tiny files in a directory
>You mean,
I only meant that your find/rm is optimal and not the poor -exec rm -f \;