Re: Copy all except one
Bob Proulx wrote:
>
> Russell <rjshaw@iprimus.com.au> [2002-08-24 16:22:04 +1000]:
> > When i do: cp /bin /mnt i get:
> > cp: omitting directory '/bin'
> >
> > Why?
> >
> > I'm in as root, and can do: cp /bin/* /mnt/bin
>
> cp by default copies _files_ only. To copy directories you must use
> one of the recursive copy options such as -r or preferably -a.
Thanks; i wanted to copy the directory names but without
recursion into the contents. I'll use mkdir then. I've
been making a bash script to copy all the directories
except for a few. When i type at the bash prompt:
debpc:/# if [-d bin]; then; echo "yes"; fi;
i get:
bash: syntax error near unexpected token ';'
Why? I've tried various ways to fix it.
Reply to: