- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Files size older then 10 days
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
11-19-2013 07:25 AM - last edited on 11-19-2013 09:12 PM by Lisa198503
11-19-2013 07:25 AM - last edited on 11-19-2013 09:12 PM by Lisa198503
Hi All,
cpmtest> model
ia64 hp superdome server SD32B
I am trying to use a command which can be used to locate files older then n days and also calculate the size of all the files , because I am planning to remove files older then 10 days and at the same time, I need to know, what size I was able to reclaim after deleting those.
Also, I would also seeking to find a command , which would list files greater then 5 mb's.
Regards
Alok
P.S. This thread has been moved from HP-UX-General to HP-UX - languages. -HP Forum Moderator
Solved! Go to Solution.
- Tags:
- find
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013 09:24 AM
11-19-2013 09:24 AM
Re: Files size older then 10 days
> Also, I would also seeking to find a command , which would list files greater then 5 mb's.
find / -size 5242880c
For your other problem, I think you should think of it this way:
- create a list of files older than N days, and save it to a file (e.g. find / -type f -mtime +N >/tmp/list-of-files)
- loop through the list of filenames, finding the size of each one and calculate the sum of the sizes.
- if you want to delete the files, use the same list of files again to delete them (another loop, or maybe using xargs)
But would it not be simpler to record the amount of disk space used/available before the deletion and again after the deletion, and calculate the difference of the two?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2013 10:54 AM