![]() ![]() type f -mtime -$days -print0 | tar -czvf $/ -null -T -ġ. Hence what I have done is a bit different. I was doing exactly same functionality but needed to preserve folder structure. The docs all reference unspecified behavior for relative target paths - and the first time I ever tried using pax I was swearing under my breath for an hour in confusion with all of the weird results until I used an absolute path. except - and the last thing worth mentioning - I use an absolute path for the target directory - and so should you if you do it. so the 11 up there in my example command is relative to today - it is one less than today's date - which is the twelfth - and the rest is just a standard "$(date)" format followed by a comma. ![]() Multiple -T time range can be supplied and checking stops with the first match. ![]() would select all files with a modification or inode change time of 12:34PM today or later. Time ranges are relative to the current time, so. The SS field may be added independently of the other fields. The minute field MM is required, while the other fields are optional and must be added in the following order: Where cc is the first two digits of the year (the century), yy is the last two digits of the year, the first mm is the month (from 01 to 12), dd is the day of the month (from 01 to 31), HH is the hour of the day (from 00 to 23), MM is the minute (from 00 to 59), and SS is the seconds (from 00 to 59). Time comparisons using both file times is useful when pax is used to create a time based incremental archive (only files that were changed during a specified time range will be archived).Ī time range is made up of six different fields and each field must contain two digits. T - the -Time option selects files for the target archive (or merely to copy when used with -wr) based on their /modification or inode /change (or both) times. verbose - for reporting on files sourced/targeted. s/src regex/replace/ - which modifies filenames in-stream X for restricting pax to the same source device and/or filesystem. link - which creates hard-links if at all possible rather than copying the file-data. wr - when pax is handed both -write and -read options it copies. You can use pax for this like: pax -wrT "11$(date +%H%M),". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |