|
I would copy the content of a directory mounted remotely in my tmp folder. Using the command: CTNML003[50] cp -r /p/demofolder .
i obtain only for some file this kind of erro: cp: cannot stat `/p/demofolder/layout/blabla/bb/sdf/sdf/fsdf/sdfds/master.tag...
Started by Rauvelore on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
The user account used for accessing the network share might have the right to read the directory... .
The first thing I would suggest looking at is access rights .
If it were a general network issue I would not expect it to always error at the same location .
|
|
Note: # cat /tmp/foo - regular file
/lib/a.lib /lib/b.lib /lib/c.lib /lib/d.lib
cat /tmp/foo | xargs cp /tmp/fred
cp: target /lib/d.lib is not a directory
Started by Aaron on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Xargs normally places its substituted args last.
Why not try something like:
cp /lib/*.lib /tmp/fred
I think your command is failing because xargs creates the following command:
cp /tmp/fred /lib/a.lib /lib/b.lib /lib/c.lib /lib/d.lib.
|
|
Yes this is not very portable, I wonder why one would want to do something like this:`
char *cp ; reinterpret_cast<char *&>(a) = cp;
` and what it means?
Thx
Started by Andrei on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
In the original sample....
Reinterpret_cast<char *>(a) = cp would have been illegal because you_cast<char*>(a); c = cp;
is probably better to maintain and read, although it's longer (note of the cast.
Lvalue to assign cp to.
|
Ask your Facebook Friends
|
Is it possible to copy a single file to multiple directories using the cp command ?
I tried the following , which did not work:
cp file1 /foo/ /bar/ cp file1 {/foo/,/bar}
I know it's possible using a for loop, or find. But is it possible using the gnu...
Started by Tom Feiner on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can't do this....
You need to arrange to invoke cp multiple times - once per destination - for what you want to do; using, as you say, a loop or some other tool.
No, cp can copy multiple sources but will only copy to a single destination.
|
|
I'm a Linux guy and I'm used to copying directory trees with cp -a . OS X doesn't have -a option on cp ... but it does have the ditto command. I'm reading the man on ditto now, but is there anything I should specifically be looking out for?
Started by trenton on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
According to the ....
Sorry that's not a direct answer.
There are also some filesystems where rsync is more efficient than cp .
As j04t pointed out that should be cp -pR
On OS X, you would do
cp -dRL src target
cp preserves.
|
|
Looking for a SW Quick
Please PM with trades etc Please mail me for international postage price
GG WB EEC complete. Trade for complete TT only . Or well used complete TT plus a little PP - really not worried about condition. Thanks. Pic to come!
GG PB...
Started by PinkNeon on
, 12 posts
by 3 people.
Answer Snippets (Read the full thread at ju-ju-be):
|
|
Is it possible to run cp again after it was aborted and make it start where it ended last time (not overwrite data that's already copied, only copy what's still left)?
Started by Phil on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
You can....
It will only copy new data across, including if cp stopped half way through a big file.
However in your case, you can use rsync now.
Rsync is a great tool also: man page at -> http .
Use the -u switch, and see the cp man page.
|
|
I am trying to copy all newer jpgs from one folder to another using the following command
cp -u --force /home/oldfolder/*.jpg /home/newfolder/
and I get the following promt:
cp: overwrite `/home/newfolder/4095-181.jpg'?
The '-u' I know is working fine...
Started by icelizard on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
Maybe your cp command is an alias? Try:
\cp -uf file folder/
yes | cp <whatever else>
unalias cp ?
Type "type cp" to see where it points, or if it is aliased..
|
|
I am trying to copy all jpgs from 1 directory to another but only new files and ones that have been updated.
I am using the following command:
\cp -uf /home/ftpuser1/public_html/ftparea/*.jpg /home/ftpuser2/public_html/ftparea/
And I am getting the error...
Started by Lizard on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Ftparea/ -name "*jpg" -exec cp -uf {} /home/ftpuser2/public_html/ftparea/ \;
You need to make sure.
|
|
I want to copy text files and only text files from src/ to dst/
groovy:000> "cp src/*.txt dst/".execute().text ===> groovy:000>
You can see the command executes w/out error but the file "src/test.txt" does not get copied to dst/
This also fails...
Started by JJohnson on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You could make your command "sh -c 'cp ...'"
groovy:000> "sh -c 'cp src array to Runtime.getRuntime().exec....
Your first example is trying to copy a file named * .
Wildcard expansion is performed by the shell, not by cp (or groovy).
|