find command characteristics on unix
How can I delete from directory2 and directory3 some files in the same time using the find command?
Some files of directory1 valides the same characteristics of the files in the 2 others d开发者_如何学Pythonirectory and directories 1,2,3 figures in the directory0.
I suppose you meant:
(cd directory1 | find -iname 'somename' -print0) |
tee >(cd directory2 && xargs -0 rm -fvi) |
tee >(cd directory3 && xargs -0 rm -fvi)
ad libitum? But I'll make the answer more specific once you do your question
To find (From the man examples)
find / -newerct '1 minute ago' -print
Print out a list of all the files whose inode change
time is more recent than the current time minus one minute
To remove
find / -newerct '1 minute ago' -print | xargs rm
精彩评论