Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 01-07-2008, 04:35 PM   #1
Registered: Jun 2005
Distribution: Centos
Posts: 215

Rep: Reputation: 30
Delete files older then 30 days

I'm after the syntax that would let me delete files older then x days.

This Linux command:

find -mtime +30 -exec rm '{}' \;

Does not work in BSD though.
Old 01-07-2008, 08:31 PM   #2
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Try specifying a path. See manpages for find(1).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script to remove files older than 3 days rust8y Linux - General 26 10-04-2012 08:26 AM
script to auto delete files older than X days nocnoc Programming 17 12-06-2006 08:30 AM
How to move files older than 30 days gfem AIX 8 11-08-2006 04:58 AM
delete files older than 30 days using cronjob latheesan Linux - Newbie 5 06-14-2005 02:40 PM
delete files in server that is older than 30 days using cronjob latheesan *BSD 2 06-14-2005 12:37 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration