$ cp /source/* /destination/
cp: overwrite `/destination/file1.conf`
Aim is to copy files from source to destination without getting prompt or using non-alias(/) method.
Command Without Alias
Any unix command can be prefixed with \
to get the non-alias version.
With Alias
#-(0) :: /dev/shm/test2 > ls
total 0
-rw-------. 1 root 0 Feb 24 16:29 a
-rw-------. 1 root 0 Feb 24 16:29 b
-rw-------. 1 root 0 Feb 24 16:29 c
-rw-------. 1 root 0 Feb 24 16:29 d
Without Alias
#-(0) :: /dev/shm/test2 > \ls
a b c d
I don't know what you mean by "using unalias method", but if you read the cp
man page, you can learn about
-n, --no-clobber
do not overwrite an existing file (overrides a previous -i option)
and
-u, --update
copy only when the SOURCE file is newer than the
destination file or when the destination file is missing
so you would have two ways to avoid the prompt. You need to decide which method is better suited for your purposes.