|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
On Thu, Oct 10, 2002 at 09:44:46AM -0400, Paul wrote:
> It gave this error: find: invalid argument `-f' to `-type'
>
> >how about
> >
> >find /tmp -type -f -user username
Yes, it should have been
find /tmp -type f -user username # No hyphen on 'f'
This is arguably the right way to do this, but sometimes one has awk
on the brain and it just comes out that way.
Using find allows you to say "... -user $username" without a
problem. You can also pipe to xargs and fork fewer processes,
preferably using the --null on xargs and --print0 on (gnu) find:
find /tmp -type f -user username --print0 | xargs --null rm
Cf. man find, man xargs
--
Jeff
Jeff Abrahamson <http://www.purple.com/jeff/>
_________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion -- http://lists.netisland.net/mailman/listinfo/plug
|
|