file deletion

file deletion

Post by Steve Bu » Fri, 17 Aug 2001 03:27:21



What would be the easiest way to delete files made after a certain date?
I would want this done recusively through a folder.
 
 
 

file deletion

Post by Robert Sherma » Thu, 16 Aug 2001 19:11:25



> What would be the easiest way to delete files made after a certain date?
> I would want this done recusively through a folder.

man find
man xargs (not necessary, but piping to xargs is more efficient than the
-exec option on find)

--
robert sherman
css, cee
georgia institute of technology
atlanta, ga, usa

 
 
 

file deletion

Post by Floyd Davidso » Fri, 17 Aug 2001 04:31:49



>What would be the easiest way to delete files made after a certain date?
>I would want this done recusively through a folder.

Read the man page for "find"

Here is an example which might help:

    find . -type f -mtime +2 -exec ls -l {} \;

This will, instead of deleting files, run "ls -l" on the selected
files.  Regular files with a modification date more than 2 days
old are selected.  If, for example, the above happens to match
what you want done, and results in a listing of the files you
really do want to delete, then

    find . -type f -mtime +2 -exec rm -i {} \;

will go through the list and ask if you really want to delete
each file, one at a time.  Leaving out the -i option to rm will
of course just zap them all, assuming user permission permit
that operation.

--
Floyd L. Davidson         <http://www.ptialaska.net/~floyd>

 
 
 

file deletion

Post by Steve Bu » Fri, 17 Aug 2001 07:36:24


Thanks!

> What would be the easiest way to delete files made after a certain date?
> I would want this done recusively through a folder.

 
 
 

1. Weird file deletion problem

Checked the FAQ for this one, but no luck.  I can't seem to do anything
with a couple of files I dl'd from a newsgroup.  After uudecoding them,
they are sitting there in the News directory, displayable by ls and dir,
but uncontrollable by get, dele, even mdele*.  Whith mdele * the
file name is printed normally as it asks me if I want to delete it, but
then as it undergoes the operation the file is not recognized, and I get
the following: ? ele <f.n.>: no such file or directory, with the cursor
placed over the d<(just there, no 'd' printed).

If anyone can suggest a way of getting these things out of my directory,
I'd be grateful.  Really. Salvage is not important, nor is the directory
itself since it's replacable.

Mike Duran

2. Include current directory in prompt? (under csh)

3. Crafty automatic file deletion?

4. Secure PPP login?

5. ext3 file deletion

6. rpm upgrades

7. file deletion protection

8. Lost and not found

9. Mysterious File deletion!

10. Intelligent, semi-automatic file deletion?

11. Recovery from file deletion

12. UNIX File Deletion Security????

13. File deletion script