main logo
Subject: Re: [ProLinux] RegEX
Author: "Leland F. Jackson, CPA"
Posted: 2003/09/25 14:43:00
 
View Entire Thread
New Search


Hi John,

You might try something along the lines of:

find / -user jack -ok rm {} ;

removes all files owned by jack

or

find / -user lee -atime +30 -mtime +60 -ok rm {} ;

The above removes all files not accessed within the last 30 days or
modified within the last 60 days and owned by user lee. It will ask the
user before execution.

or

find / -user lee -cpio /dev/rfd096ds15 Backup to floppy

or

find / -user lee -exec du {} ;

Display disk usuage for user lee

LelandJ

The commands are from an old SCO Unix Operating System User's Reference,
so you will probably need to research the syntax and adjust to exactly
delete your target files.

LelandJ


John Schmerold wrote:

> I'm trying to delete junk files from a file server with the following:
> # rm $(find /home/* | grep -i .tmp | grep WRL)
> & Due to spaces in directory names I get:
> rm: cannot remove `/home/data/WORDDATA/Sunday': No such file or directory
> rm: cannot remove `Bulletin/2002': No such file or directory
> rm: cannot remove `Bulletins/~WRL3734.tmp': No such file or directory
>
> A find gives me:
> # find /home/* | grep -i .tmp | grep WRL
> /home/data/WORDDATA/Sunday Bulletin/2002 Bulletins/~WRL3734.tmp
>
> I must be missing something simple. What is it?
>
>
[excessive quoting removed by server]


 
©2003 Leland F. Jackson, CPA
<-- Prior Message New Search Next Message -->