gopikrish
asked on
Copying all files from one directory to another?
Suppose I am in the directory /gopi
And there are directories called as publicsource and publicdest in this /gopi directory.publicsource has some files in it whereas publicdest is empty directory.
So how to copy all files from publicsource to publicdest from /gopi directory?
When I did,
cp -fR /gopi/publicsource /gopi/publicdest
the directory publicsource is itself getting copied to publicdest directory but i want only the files to be copied. So please help me.Thanks.
And there are directories called as publicsource and publicdest in this /gopi directory.publicsource has some files in it whereas publicdest is empty directory.
So how to copy all files from publicsource to publicdest from /gopi directory?
When I did,
cp -fR /gopi/publicsource /gopi/publicdest
the directory publicsource is itself getting copied to publicdest directory but i want only the files to be copied. So please help me.Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> Ok and what does the following command do?
> "cp -f /home/files/myfirstscript ."
It makes a copy of /home/files/myfirstscript in the current directory (.).
The copy will have the same name as the original. The -f switch forces
any existing file in the current directory by that name to be overwritten.
> "cp -f /home/files/myfirstscript ."
It makes a copy of /home/files/myfirstscript in the current directory (.).
The copy will have the same name as the original. The -f switch forces
any existing file in the current directory by that name to be overwritten.
ASKER
"cp -f /home/files/myfirstscript ."