- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- deletion of multiple files
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
Forums
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
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
11-08-2000 09:32 AM
11-08-2000 09:32 AM
server to free up space in a volume group, i don't want to automate a script for these process but rather would excute a command from the console. i know the rm command works,but this may be a lenghty process.
please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2000 09:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2000 09:39 AM
11-08-2000 09:39 AM
Re: deletion of multiple files
find /
(If you don't mind verifying before each file removal, a good idea if you are not certain of your criteria. Alternatively, exec an ls first, check the list, then exec an rm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2000 09:45 AM
11-08-2000 09:45 AM
Re: deletion of multiple files
if so you can have a text file containing the names of the files, ie remove.files
then
for REMOVE in `more remove.files`
do
rm $REMOVE
done
you could run this once a week for example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2000 09:46 AM
11-08-2000 09:46 AM
Re: deletion of multiple files
You could use something halfway between the script and the simple rm to make life easier.
Something like...
find /path_dir -type f -size +2048 -print -exec rm -i {} \;
... will find all files bigger than 1mb (2048x512 chars)
... print their names
... ask dor a delete confirmation (rm -i)
Be careful with the /path_dir as it will
look for all files in that tree. Imagine what could happen if you erase system files :-((
Make sure to use the 'rm -i' !!!
You could further restrict the files found with using the '-name' flag for find
like:
find /path_dir -type f -name "*.log" -size +2048 -print -exec rm -i {} \;
Regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2000 09:59 AM
11-08-2000 09:59 AM