Toki Winter

Advanced UNIX for the experienced system administrator

Menu

Skip to content


  • Home
  • Archives
  • Who is Toki Winter?
  • FAQ
  • Recommendations
  • Consulting Services
  • Contact Toki

How to Remove Empty Files

Simple one-liner to remove empty files older than 7 days:

1
# find . -type f -mtime +7 -size 0c | xargs rm

 

Related posts:

  1. How to Selectively Remove Files
  2. Files and Filesystems: Core Files
  3. How to Remove Bounces From the Mail Queue
  4. Files and Filesystems: Remove Files With Strange Filenames
This entry was posted in UNIX & Linux Code Snippets and tagged tips and tricks on December 1, 2012 by Toki Winter.

Post navigation

← Files and Filesystems: How to Mount ISO Images SSL - How to Check an HTTPS webserver →
tokiwinter.com is a site for the experienced UNIX user by a UNIX, Linux, and middleware specialist, and includes tonnes of tips, scripts, howtos and tutorials on everything from Solaris zones to alternative DNS servers and much more.

follow me via …

Visit Us On FacebookVisit Us On TwitterVisit Us On Google PlusVisit Us On LinkedinCheck Our Feed

lately I’ve been writing about:

  • PowerDNS with BIND Backend
  • Configuring GFS2 on CentOS 7
  • Building a Highly-Available Apache Cluster on CentOS 7
  • Nagios Plugin - check_mem
  • Configuring and Deploying MCollective with Puppet on CentOS 6

categories

  • Non-UNIX Operating Systems (4)
  • Puppet Module (5)
  • UNIX & Linux Code Snippets (15)
  • UNIX & Linux How Tos and Tutorials (89)
  • UNIX & Linux Scripts (1)
  • UNIX Industry (3)

Tags

Apache automation AWS BIND CentOS clustering DECnet DNS EC2 files and filesystems GNU hardening High-Availability HTTPD iSCSI ksh kvm legacy articles logging mod_rewrite MySQL Nagios network configuration networking nginx OpenVMS oracle perl puppet Replication RHCS ruby security SELinux shells solaris solaris 11 solaris cluster SSL text manipulation tips and tricks ubuntu virtualisation ZFS zones