Re: rm - Arguments too long

From: cljlk (cljlk@hotmail.com)
Date: 04/23/03


From: cljlk <cljlk@hotmail.com>
Date: Wed, 23 Apr 2003 09:52:55 -0400

Thanks!!!

It works for find . -name "something*" | xargs rm -f.
Would anyone tell me how to specify day-old file.
Let's say, I want to delete 3 days old file, how do I combine together
with "find . -name "something*" | xargs rm -f" command.
Thanks in advance

Scott Williamson wrote:
> cd <directory>
> find . -type f | xargs rm -f
> cd ..
> rm -rf <directory>
>
> Or alternatively
>
> mv <directory> <directory>.junk
> rm -rf <directory>.junk &
> mkdir <directory>
>
> This way you can use the fresh directory and don't care how long it
> takes to delete the old one.
>
> Radical suggestion:
>
> (as root)
> unlink <directory>
> Then unmount the filesystem and "fsck -y"
> Although this might re-connect everything into lost+found.
>
> Scott.
>



Relevant Pages

  • Re: rm - Arguments too long
    ... Would anyone tell me how to specify day-old file. ... Scott Williamson wrote: ... > (as root) ...
    (comp.unix.solaris)
  • Re: rm - Arguments too long
    ... Would anyone tell me how to specify day-old file. ... Scott Williamson wrote: ... > (as root) ...
    (comp.unix.admin)