FreeAntivirus

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, January 22, 2010

How to Periodically remove temporary files in Linux

Posted on 12:05 AM by Unknown
To remove periodically some files from a specific directory you can easily setup a cron entry. Execute in shell

crontab -e

and add

*/60 * * * * find /home/my_home/some_dir/ -name '*.dat' -mmin +60 -exec rm {} \;

where .dat is the suffix of the files and "-mmin +60 -exec rm {}" is the option telling to remove the files with data modified more than 60 minutes ago.

If your crontab uses Vim
Email ThisBlogThis!Share to XShare to Facebook
Posted in How to ... | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • [ How to ] Use CentOS repos in RHEL-5 Server
    1. Remove "yum-rhn-plugin" package from RHEL, this is used to check the activation in RHEL. # rpm -e yum-rhn-plugin 2. Remove the ...
  • Google's G1 phone : Reviews
    The T-Mobile G1 Android-powered phone is the first mobile phone with the operating system (OS) designed by Google.Given Google's reputat...
  • How to Connect Wifi card using Command line
    To scan wireless networks sudo iwlist scanning then change the mode to "managed" iwconfig wlan0 mode Managed then to set SSID iwco...
  • Google Chrome logo derived from Microsoft's logo ??
  • Google introduced new Voice and Video Chat !!
    Google today launched Gmail voice and video chat, making it simple for people around the world to chat in high-quality video for free right ...
  • How to install Windows 7 from Ubuntu without burnning a disc
    If you’re running on ubuntu and want to install Windows 7 without burning a disc,you can try following steps to install Windows 7 with the i...
  • [How to] boot from Linux ISO FILE using Grub 2
    Edit /etc/grub.d/40_custom and add the below entry menuentry "Karmic Live CD (sdaX)" { loopback loop (hd0,X)/my-ISO/ubuntu-9.10-de...
  • Convert text files to MP3 under Linux
    First we would need to install festival. We can install festival with the following command :sudo apt-get install festivalNow we need to ins...
  • Google Launches Linux Software Repositories
    Google has just released the Google Linux Software Repositories, a centralized place where we can download and update the latest ve...
  • Installing Ubuntu without external media
    The below method is only applicable if you alread have Linux (any) running, here I am using OpenSuSe 11.1 to install ubuntu-9.04 (Jaunty Ja...

Categories

  • administration
  • Antivirus
  • Apache
  • Apple
  • AppZ
  • Blog
  • boot
  • CentOS
  • Communication
  • Database
  • disc
  • Download
  • Drivers
  • Editor
  • encryption
  • Fedora
  • File management
  • Filesystem
  • Font
  • Fun
  • gaming
  • Gnome
  • Google
  • Gossips
  • How to ...
  • internet
  • KDE
  • Kernel
  • Kidz
  • laptop
  • Linux
  • Linux embedded Devices
  • Mail
  • Media centre
  • Memory
  • mobile
  • MS
  • multimedia
  • network
  • News
  • Oracle
  • PDF
  • pendrive
  • Perl
  • processor
  • Programming
  • proxy
  • Reviews
  • script
  • security
  • sql
  • Squid
  • ssh
  • Supercomputer
  • SuSe
  • Themes
  • trickz n tipz
  • TweakZ
  • ubuntu
  • Video
  • Video editing
  • Virus
  • zip

Blog Archive

  • ▼  2010 (62)
    • ►  June (1)
    • ►  May (6)
    • ►  April (28)
    • ►  March (11)
    • ►  February (5)
    • ▼  January (11)
      • How to benchmark a C++ code
      • How to Periodically remove temporary files in Linux
      • How to Encrypt directories using EncFS
      • How to change MAC address of your WIFI or Etherne...
      • How to Setup Transparent Squid Proxy Server in Ubuntu
      • How to convert CHM to PDF in LInux
      • Google To Switch To EXT4
      • How to disable KVM in running kernel to solve erro...
      • 40,000 processors and 104 TB of RAM Assembled to R...
      • [ ubuntu ] Quick and Dirty method to remove a corr...
      • How to enable file and folder listing in apache
  • ►  2009 (367)
    • ►  December (16)
    • ►  November (23)
    • ►  October (45)
    • ►  September (44)
    • ►  August (35)
    • ►  July (1)
    • ►  June (20)
    • ►  April (6)
    • ►  March (8)
    • ►  February (18)
    • ►  January (151)
  • ►  2008 (69)
    • ►  December (31)
    • ►  November (38)
Powered by Blogger.

About Me

Unknown
View my complete profile