Skip to main content

Thread: cp command weirdness and rsync question


hi guys,

have strange situation:

long time i've been using script command:

code:
cp -r ~/source/ ~/insync/google_address/destination/
a few days ago noticed ending source folder inside destination folder, not wanted. modified command to:

code:
cp -r ~/source/* ~/insync/google_address/destination/
things seemed working nicely.

then, decided wanted add folder backup script. wanted backup ~/notes folder insync folder.
added this:
code:
cp -r ~/notes/* ~/insync/google_address/destination/
here weird part:
when script ran, contents of ~/notes moved (or copied , deleted from) ~/notes.

not understand why.

so, googled , found how rsync.

code:
rsync -r -t -v --progress -s /home/gg/notes /home/gg/insync/google_address/
so far good, in fact thought why not replace of backup cp commands rsync?
well, have gotten habit of unhiding hidden files , folders when them up. example: .bash_aliases backed bash_aliases. reason being if don't see backed file, will forget there. in same vein have couple of hidden folders backup without .

long winded intro leads question: can hidden file or folder using rsync , have backed folder not hidden? .bash_aliases bash_aliases, example?

update: ok i'm goof. see rsync copy single files , let change name wanted.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu cp command weirdness and rsync question


Ubuntu

Comments

Popular posts from this blog

Thread: Raspberry pi wont get past the login menu!!!

NIK SELECTIVE TOOL INTERMITTANT FAILURE.