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

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?