Skip to content

Leiame failipuust teatud vanusega failid ning kopeerime mujale

Mõnikord on vaja hiidsuurest failipuust vaja leida mingi vanusega failid ja mujale kopeerida. Linuximaailmas saad seda teha nii:

find . -type f -mtime -60 -exec cp -a --parents -t ~/tmp "{}" \+

Otsitavaid faile ja sihtkausta muuda vastavalt vajadusele. Antud näites " -type f -mtime -60" tähendab et otsi 60 päeva vanu faile (mtime on viimase muutmise aeg) ning "~/tmp" tähendab et tõsta nad kodukaustas tmp alamkausta.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

The author does not allow comments to this entry

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options