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/* /path/to/destinationdir/B > > BTW, with GNU ls, -r is the same as -R, but doesn't require pressing <Shift> > :) > > 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 needed.
PS, I usually use /path/to/destinationdir/B/ , rather than /path/to/destinationdir/B , when "B" is meant to be a directory - it sometimes gives better error output, and also is a very good habit to get into if you start to use rsync. Which reminds me, rsync is often a better cp; I often use it locally, not only to copy between separate computers/hosts. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/caosgnsrvjvkeeglf5e2rhkkanyzzv1qnrtza_tki_3ua_72...@mail.gmail.com