[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 09/24/2014 at 10:29 AM, Gokan Atmaca wrote:

> Within a directory backup "tar.gz" files you want to delete older 
> than 1 day.
> 
> I'm doing this as follows. But do not be.
> 
> find /backup/ +1 -delete -mtime
> 
> Can you help?

I'm not terribly familiar with the intricacies of find options, though
I'm decently competent with the basics - but at a glance, I think the +1
is in the wrong place. Positioned before the options like that, I think
it's being treated as another path to search.

Does

find /backup/ -delete -mtime +1

do what you want?

- -- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJUItcXAAoJEASpNY00KDJrJr8QAJNghpUt2kKwUkPvgUUa4zst
NW080v/tU6V2VAJCtb9I7YuFxUp44bAYMXxxawBpB1SDTEAzq/IOe0GGpNYMWjvh
uEM/7tQ93FdG0JIO6GnESMGCOsb6VH8G8Km8N7L55tuhdmfjhXSTRSIB/BEqHCrN
2sfom/pNB6LMXafTv24RBvUMM1JQeHSVQPsqyyC0klolAatOHOU+3tAqtA1QpNbL
R3132NDGDR0zo81Gfih220GE7qZrF63t/Un9GQgcR71nm0w3dvoM1sSWAUF+EJk3
xAaNHatCo+/hqzfeDpPGUgeDXWRRl+UqWcoWHWPzr/sHfFEAbp9Njg1xAUjyY6kX
ZEy01dVqeWFWhC937t5rMxUa3ioh5gBzDJH92XHXJkZLxXmdfXR+eBavAO4lrUeu
zZ9AL4TkLBew5TyvBwuuyUIZVYuIdlR53KqOUN9WlzaBpmwavj+Q5HTyvbBHPPk4
7erYttns0Fs/kCE0r7xg0ifT/W1hV2kyYvAJE5sCnwJ5C+mI7C3p1UqdDfbARS1E
oszRpddgZNJ/6OC0qQy3i8RxGyI2RnooZDaO3rZx+uOig0iLr9uEhQNzGpGsJaqn
3sJQChE5VcrNf6VCpTMJkhaDGLUlunmI9ndj8hOZXVY44QNmkPj086t6lNBLYw4n
NWU2l5Bt1A7O+ckiRR6w
=oHTU
-----END PGP SIGNATURE-----


Reply to: