-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Forgot to CC the list. I can never remember which lists fill in the reply-to field automatically.
- -------- Original Message -------- Subject: Re: [64studio-users] Red alert, "cp" command, resp. behaviour of Ubuntu Date: Fri, 01 May 2009 04:59:20 -0600 From: Gustin Johnson <[email protected]> To: Ralf Mardorf <[email protected]> References: <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> Ralf Mardorf wrote: > Gustin Johnson wrote: >> Of course not, just running "cp *" from within the directory you are >> copying will only select regular files (ie. ones that do not start with >> "."). >> >> Doing a cp -a on the directory itself would be the easiest way to >> accomplish what you want. >> >> Personally, I no longer use cp, rsync does everything I need an more. >> > > Hi Gustin :) > > okay, 'normally' I'm using rsync too. I didn't run cp *, but cp -a * and > it failed. Now I'll test rsync -r, resp. rsync -rvu. > cp -a .mozilla/firefox/3ehxz5yh.default/ .mozilla/firefox/--TEST--.#2 would have worked for you. Doing it in two operations would have also worked: "cp -a * /path/to/destination/folder && cp -a .* /path/to/destination/folder" By the way, using "#", or any other unusual character in your file or directory names is asking for trouble, regardless of your OS. This is particularly true if you are sharing files between different OSs. <snip> > spinymouse-s...@64studio:~$ rsync -rvu > .mozilla/firefox/3ehxz5yh.default/ .mozilla/firefox/--TEST--.#2 > sending incremental file list > .parentlock > [snip] > > Hm, rsync is fine, it copied .parentlock too. > > Anyway, cp failed and it shouldn't fail. It didn't fail, it did exactly what you told it to do. By default it ignored hidden files and folders. You will notice similar behaviour with other command line tools, like du. > > The lesson is clear: cp is unsafe, using Nautilus or rsync will do the job. > No, cp is safe, unsafe is definitely the wrong word. cp has its place, you just need to know how and when to use it, like every other tool. Nautilus will only work in this case if you configure it to show hidden files and folders, which it it usually isn't set to do so by default. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn61oQACgkQwRXgH3rKGfOGKQCfdUlPXxj93Qz4vDxeGhZyB0xl kUEAn3tOXbF7WLc2RICN3hr982qaTeMS =i5/P -----END PGP SIGNATURE----- _______________________________________________ 64studio-users mailing list [email protected] http://lists.64studio.com/mailman/listinfo/64studio-users
