Skip to main content

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:
code:
find /path/to/folder/ -maxdepth 1 -type f -exec cp "{}" "/path/to/backup/folder/{}" \;
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 ! -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

Popular posts from this blog

Object Fitting Keyboard Shortcuts Disfuntional

Markers not showing up after opening a saved project. Where did they go!?

After Effects error: (-1610153453)