Re: Help with command - cp

2014-02-02 Thread Tom H
On Sun, Jan 26, 2014 at 9:40 AM, Zenaan Harkness z...@freedbms.net wrote: BTW, with GNU ls, -r is the same as -R, but doesn't require pressing Shift :) What do you mean by GNU ls? The ls provided by coreutils? If it is, then -r mean reverse the sort order and -R means recurse through

Re: Help with command - cp

2014-01-30 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-30 01:51, Zenaan Harkness wrote: On 1/30/14, Felix C. Stegerman f...@obfusk.org wrote: On 2014-01-29 10:43, berenger.mo...@neutralite.org wrote: And then: $ cd ~/bar rm `find -name '.*'` Find is indeed very useful, but that's

Re: Help with command - cp

2014-01-29 Thread berenger . morel
Le 26.01.2014 15:26, Lisi Reisz a écrit : I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B Thanks, Lisi Just a note, too late but it could help

Re: Help with command - cp

2014-01-29 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-29 10:43, berenger.mo...@neutralite.org wrote: Le 26.01.2014 15:26, Lisi Reisz a écrit : I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :--

Re: Help with command - cp

2014-01-29 Thread Zenaan Harkness
On 1/30/14, Felix C. Stegerman f...@obfusk.org wrote: On 2014-01-29 10:43, berenger.mo...@neutralite.org wrote: And then: $ cd ~/bar rm `find -name '.*'` Find is indeed very useful, but that's probably a bad idea. You'll get into trouble with filenames containing spaces for example. If

Re: Help with command - cp

2014-01-28 Thread Andrew McGlashan
On 27/01/2014 3:05 AM, Lisi Reisz wrote: * The --dry-run option will show you what the command will do As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. Don't be scared of rsync, it works a great deal

Re: Help with command - cp

2014-01-28 Thread Mr Smiley
On 28/01/14 13:22, Andrew McGlashan wrote: On 27/01/2014 3:05 AM, Lisi Reisz wrote: * The --dry-run option will show you what the command will do As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. Don't

Help with command - cp

2014-01-26 Thread Lisi Reisz
I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B Thanks, Lisi -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of

Re: Help with command - cp

2014-01-26 Thread Zenaan Harkness
On 1/27/14, Lisi Reisz lisi.re...@gmail.com wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B BTW, with GNU ls, -r is the same as -R, but

Re: Help with command - cp

2014-01-26 Thread Zenaan Harkness
On 1/27/14, Zenaan Harkness z...@freedbms.net wrote: On 1/27/14, Lisi Reisz lisi.re...@gmail.com wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/*

Re: Help with command - cp

2014-01-26 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-26 15:26, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B Not quite.

Re: Help with command - cp

2014-01-26 Thread Lisi Reisz
On Sunday 26 January 2014 14:40:26 Zenaan Harkness wrote: Your command will exclude files and dirs beginning with period ('.'), in the directory /path/to/sourcedir/A/ but not hidden files in subdirectories (I note your -R/-r option). If you really are only copying files, then -r is not

Re: Help with command - cp

2014-01-26 Thread Lisi Reisz
On Sunday 26 January 2014 14:49:31 Felix C. Stegerman wrote: On 2014-01-26 15:26, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files.  Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/*

Re: Help with command - cp

2014-01-26 Thread Lisi Reisz
Sorry for sending this off-list, Gord. Resending to where it ought to have gone in the first place. On Sunday 26 January 2014 15:09:10 ghaverla wrote: Your requirement (to skip hidden files and directories) is what is usually required. But, as a generic rule, you can use the echo command to

Re: Help with command - cp

2014-01-26 Thread Ralf Mardorf
On Sun, 2014-01-26 at 14:26 +, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B Globbing lady! Yesno, it won't copy hidden

Re: Help with command - cp

2014-01-26 Thread Brian
On Sun 26 Jan 2014 at 16:05:52 +, Lisi Reisz wrote: As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. The Midnight Commander (mc) is worth considerating for the sort of job you described. See 'File

Re: Help with command - cp

2014-01-26 Thread Lisi Reisz
On Sunday 26 January 2014 16:53:17 Brian wrote: On Sun 26 Jan 2014 at 16:05:52 +, Lisi Reisz wrote: As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. The Midnight Commander (mc) is worth

Re: Help with command - cp

2014-01-26 Thread Go Linux
On Sun, 1/26/14, Lisi Reisz lisi.re...@gmail.com wrote: Subject: Re: Help with command - cp To: debian-user@lists.debian.org Date: Sunday, January 26, 2014, 10:05 AM As I said to Zenaan, it is obviously time for me to bite the bullet of rsync

Re: Help with command - cp

2014-01-26 Thread Mathias Bauer
* Felix C. Stegerman wrote on 2014-01-26 at 15:49 (+0100): On 2014-01-26 15:26, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? I prefer using rsync instead: $ rsync --dry-run -av

Re: Help with command - cp

2014-01-26 Thread Mr Smiley
On 26/01/14 14:26, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B Thanks, Lisi If you don't put a / after B it will copy all

Re: Help with command - cp

2014-01-26 Thread Mathias Bauer
* Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B If you don't put a / after B it will copy all files to a file called B No, obviously not. $ mkdir src $ echo foo src/file1 $ echo bar src/file2 $ echo baz

Re: Help with command - cp

2014-01-26 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-26 21:48, Mathias Bauer wrote: * Felix C. Stegerman wrote on 2014-01-26 at 15:49 (+0100): On 2014-01-26 15:26, Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files.

Thanks! Re: Help with command - cp

2014-01-26 Thread Lisi Reisz
On Sunday 26 January 2014 14:26:18 Lisi Reisz wrote: I am wanting to use the CLI to copy some files from dirA to dirB. I want to exclude all hidden files. Will this command achieve it? :-- cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B I have been away from my computer for a

Re: Help with command - cp

2014-01-26 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-26 23:24, Mathias Bauer wrote: * Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B If you don't put a / after B it will copy all files to a file called B No, obviously not.

Re: Help with command - cp

2014-01-26 Thread Zenaan Harkness
On 1/27/14, Go Linux goli...@yahoo.com wrote: On Sun, 1/26/14, Lisi Reisz lisi.re...@gmail.com wrote: As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. Maybe you'd find grsync gui less intimidating

Re: Help with command - cp

2014-01-26 Thread Zenaan Harkness
On 1/27/14, Mathias Bauer mba...@gmx.org wrote: * Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B If you don't put a / after B it will copy all files to a file called B No, obviously not. true So your above cp -Rp

Re: Help with command - cp

2014-01-26 Thread Jeff Bauer
On Sun, 1/26/14, Lisi Reisz lisi.re...@gmail.com wrote: As I said to Zenaan, it is obviously time for me to bite the bullet of rsync. It seems a significantly better tool for the purpose than cp. Some time ago I was using cp for bulk file copying, but was having some issues with

Re: Help with command - cp

2014-01-26 Thread Mathias Bauer
* Felix C. Stegerman wrote on 2014-01-26 at 23:58 (+0100): On 2014-01-26 23:24, Mathias Bauer wrote: * Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B If you don't put a / after B it will copy all files to a file called B

Re: Help with command - cp

2014-01-26 Thread Zenaan Harkness
On 1/27/14, Mathias Bauer mba...@gmx.org wrote: * Felix C. Stegerman wrote on 2014-01-26 at 23:58 (+0100): On 2014-01-26 23:24, Mathias Bauer wrote: * Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/* /path/to/destinationdir/B If you don't put a / after

Re: Help with command - cp

2014-01-26 Thread Felix C. Stegerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2014-01-27 02:04, Mathias Bauer wrote: * Felix C. Stegerman wrote on 2014-01-26 at 23:58 (+0100): On 2014-01-26 23:24, Mathias Bauer wrote: * Mr Smiley wrote on 2014-01-26 at 20:56 (+): cp -Rp /path/to/sourcedir/A/*

Re: Help with command - cp

2014-01-26 Thread Ralf Mardorf
On Sun, 2014-01-26 at 23:24 +0100, Mathias Bauer wrote: If the target directory *exists* the trailing slash will *not* be necessary On Mon, 2014-01-27 at 12:44 +1100, Zenaan Harkness wrote: and yet there is the advantage of training the fingers Using the tab-key a / is automatically attached.

Re: Help with command - cp

2014-01-26 Thread ghaverla
Your requirement (to skip hidden files and directories) is what is usually required. But, as a generic rule, you can use the echo command to help with analysing how the command line shell might expand a wild card. echo cp /path/to/src/* /path/to/dest some_tmp_file If I do this on my home