Re: find, -delete, and relative paths

2000-11-22 Thread Brian Reichert

On Tue, Nov 21, 2000 at 12:08:56PM +1030, Daniel O'Connor wrote:
 
 On 20-Nov-00 Brian Reichert wrote:
   I didn't find anything after an admittedly quick look intp PRs and the mail
   list archives:
   
   Under FreeBSD 3.4-RELEASE, we are running a simple log file scrubber:
   
 15 3 * * * find /usr/local/logs/lsp \! -ctime 1 -delete
   
   I pointedly am using an absolute path, yes I get this warning repeatedly:
   
 find: -delete: /usr/local/logs/lsp: relative path potentially not safe
   
   How can I suppress this warning?  Is it a bug in find, or did I
   misunderstand the manpage?
 
 I don't know why, but I think find prints those messages when you attempt to delete
 a directory.
 
 If you do -
 15 3 * * * find /usr/local/logs/lsp -type f -a \! -ctime 1 -delete
 
 it should work..

To wrap up, the above suggestion does shush up 'find' WRT absolute vs.
realtive pathnames, at least in my case...

 ---
 Daniel O'Connor software and network engineer
 for Genesis Software - http://www.gsoft.com.au
 "The nice thing about standards is that there
 are so many of them to choose from."
   -- Andrew Tanenbaum

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: find, -delete, and relative paths

2000-11-22 Thread Aleksandr A.Babaylov

Cyrille Lefevre writes:
 "Daniel O'Connor" [EMAIL PROTECTED] writes:
  On 20-Nov-00 Brian Reichert wrote:
I didn't find anything after an admittedly quick look intp PRs and the mail
list archives:

Under FreeBSD 3.4-RELEASE, we are running a simple log file scrubber:

  15 3 * * * find /usr/local/logs/lsp \! -ctime 1 -delete

I pointedly am using an absolute path, yes I get this warning repeatedly:

  find: -delete: /usr/local/logs/lsp: relative path potentially not safe

How can I suppress this warning?  Is it a bug in find, or did I
misunderstand the manpage?
  
  I don't know why, but I think find prints those messages when you attempt to delete
  a directory.
  
  If you do -
  15 3 * * * find /usr/local/logs/lsp -type f -a \! -ctime 1 -delete
  
  it should work..
 
 15 3 * * * find /usr/local/logs/lsp -depth \! -ctime 1 -delete
 
 could be better, deletes file entries before directory ones.
 
 PS : -a is not necessary, it's always implied except if -o of course.

Look at ports/sysutils/deleted
daemon that deletes old files, directories and other

-- 
@BABOLO  http://links.ru/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: find, -delete, and relative paths

2000-11-21 Thread Cyrille Lefevre

"Daniel O'Connor" [EMAIL PROTECTED] writes:

 On 20-Nov-00 Brian Reichert wrote:
   I didn't find anything after an admittedly quick look intp PRs and the mail
   list archives:
   
   Under FreeBSD 3.4-RELEASE, we are running a simple log file scrubber:
   
 15 3 * * * find /usr/local/logs/lsp \! -ctime 1 -delete
   
   I pointedly am using an absolute path, yes I get this warning repeatedly:
   
 find: -delete: /usr/local/logs/lsp: relative path potentially not safe
   
   How can I suppress this warning?  Is it a bug in find, or did I
   misunderstand the manpage?
 
 I don't know why, but I think find prints those messages when you attempt to delete
 a directory.
 
 If you do -
 15 3 * * * find /usr/local/logs/lsp -type f -a \! -ctime 1 -delete
 
 it should work..

15 3 * * * find /usr/local/logs/lsp -depth \! -ctime 1 -delete

could be better, deletes file entries before directory ones.

PS : -a is not necessary, it's always implied except if -o of course.

Cyrille.
--
home: mailto:[EMAIL PROTECTED] work: mailto:[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message