Thread: How To backup different file extensions in one go
hi,
have 1 folder contains lot of files different extensions i,e .doc , .xls etc. there folders on there .
backup files not directories folder how can that?
or can restrict files should not backup? means want exclude files well.
appreciated
you can use find:
if want exclude files, add negative name (or iname, case insensitive search) switch. if, example, want backup files not ones end .txt (or .txt), use:code:find /path/to/folder/ -maxdepth 1 -type f -exec cp "{}" "/path/to/backup/folder/{}" \;
code:find /path/to/folder/ -maxdepth 1 -type f ! -iname "*.txt" -exec cp "{}" "/path/to/backup/folder/{}" \;
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] How To backup different file extensions in one go
Ubuntu
Comments
Post a Comment