Transfer changed files

From MK Wiki EN
Revision as of 17:19, 28 June 2018 by MkWikiEnSysOp (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

tar files on computer with modified file

cd /path
tar cfz `date +%Y%m%d_%H%M%S`.tar.gz `find . -mtime -20 -type f -name "*"`

Credits (slightly modified)

Explanation: find all files that have been modified (mtime) in the recent 20 days and put them into a tar.gz-file whose name represents the current date and time.

untar files on destination computer

cd /path
tar -zxvf name-of-file.tar.gz