[Home]TipsNTricks

Saskatoon Linux Group | RecentChanges | Preferences

Delete files older than X days:
find /path/to/files* -mtime +5 -exec rm \{\} \;
(where +5 means older than 5 days.)
You _could_ use:
find /path/to/files* -mtime +5 -delete
but if you have many, many files, it will fail due to the list being too large.  The earlier one spawns an "rm" for each file. (which might be slower)
If you want to log the delete:
bash -c ‘date;find /path/to/files* -mtime +5 -exec rm -v \{\} \;;date’ > ~/mylog
This will echo the date into the file, then echo each file that gets deleted, then echo the date once more.
[Linux Distribution Chooser] - answer questions to find the right [distro] for you; good for beginners.

LinuxDesktop tips, reviews and how tos for Linux beginners... all are welcome.

[Adventures in Linux with Ubuntu] - notes on the OS including problems encountered and their solution.

ConfigurePostfix to use a mail relay on port 587 that requires SMTP AUTH.

ConfigurePostfixTo require SMTP AUTH to relay

SearchNReplace and replace text in a bunch of files in a directory.

HowToGetMcAfee Virusscan for linux working with Debian 3.0

[F-Protect] Antivirus for linux: Stop the virus' before they reach a windows box!

PrintersCUPS

EtherBootTalk from July 2001. I found this while cleaning up files.

SettingUp apache-ssl using a CA such as GoDaddy? or GeoTrust?

How to CompileAKernel the Debian way

How to CompileAProgram the Debian way

How I set up MythTV

How To do PostfixAmavisd-newClamAvSpamassassin? on Debian 4.0 Etch

How to set up and use keys in ssh: [make your keys, copy public to server] but it's annoying to always have to type my passphrase. Isn't there an easier way? [Use ssh-agent and keychain]


Saskatoon Linux Group | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited April 24, 2012 3:22 pm (diff)
Search: