- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Delete files with .Z extension
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
10-14-2005 04:03 AM
10-14-2005 04:03 AM
Delete files with .Z extension
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2005 04:06 AM
10-14-2005 04:06 AM
Re: Delete files with .Z extension
find /dir1 /dir2 -name "*.Z" -exec rm {} \;
-and-
find /dir1 -name archive -exec rm {} \;
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2005 04:08 AM
10-14-2005 04:08 AM
Re: Delete files with .Z extension
# find ./ -name *.Z -print | xargs rm
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2005 04:19 AM
10-14-2005 04:19 AM
Re: Delete files with .Z extension
find / -type d -name archive -exec rmdir {} \;
if you don't wish to remove ALL archive "folders", cd to the parent directory and change the command to;
find . -type d -name archive -exec rmdir {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2005 02:12 AM
10-17-2005 02:12 AM
Re: Delete files with .Z extension
find /dir1 /dir2 -name "*.Z" -exec ls -ldb {} \+
-and-
find /dir1 -name archive -exec ls -ldb {} \+
Just a suggestion to save the headaches of accidently removing something you didn't intend, or to at least have a report of what is being removed for reporting purposes.
Also note the plus (+) at the end of the "find" command as opposed to a semicolon makes the find run much faster. I say this with all due respect to Pete and Alan.
Regards,
Steve