Tagged Questions
1
vote
2answers
63 views
Shell : Сopy one directory to multiple directories
There is a directory YYY and a structure on the site:
site1.ru/wp-content/plugins/
site2.ru/wp-content/plugins/
...
site10.ru/wp-content/plugins/
Task: YYY directory to copy all directories plugins ...
3
votes
3answers
291 views
Copy multiple files to one dir with parallel
I'm using the following script to copy multiple files into one folder:
{ echo $BASE1; echo $BASE2; echo $BASE3; } | parallel cp -a {} $DEST
Is there any way to use only one echo $BASE with brace ...
9
votes
4answers
1k views
Copying a single file to multiple directories using cp
This question is a sequel of sorts to my earlier question, Creating numerous directories using mkdir.
I am using the bash shell. I have created fifty directories, each starting with the prefix "s", ...
5
votes
3answers
1k views
cp or rsync, is cp really worth it?
I hope this does not count as a question without a real answer, as I can't seem to find a good reason to use cp(1) over rsync(1) in virtually all circumstances. Should one typically favour rsync over ...
2
votes
4answers
510 views
Make directory copies using find
I have a directory with a bunch of subdirectories in it. Thus
/usr/local/src/ccl/ccl-1.8/x86-headers$ ls
elf gl gmp gnome2 gtk2 jni libc
Each of these directories has a further subdirectory C ...
5
votes
2answers
441 views
Batch copy to multiple directories
I have about 9000 files in a directory and I want to mv them into 90 files in 100 directories by filename order, ignoring any remainder. In Copy multiple files from filename X to filename Y?, Caleb ...
0
votes
2answers
111 views
How to copy a file and move it to a location using unix
I need a file to stay in the same location but also move it to a different location.
What am I doing wrong?
cp RubyTest.sublime-settings \
~/Library/Application Support/Sublime\ Text\ ...
2
votes
3answers
472 views
cp launched from code results in cannot stat '/tmp/somedir' works in shell
I'm working on making some scripts more elegant by implementing them in a real x application etc...
At some point in the scripts we basically want to take everything from a mounted removable storage ...
4
votes
3answers
1k views
How do I move some but not all files from one directory to another?
I need to move my files from one directory to other. But there is some issues. My file name pattern is like:
apple.0, apple.<n>, n -> {0,1,2,3 ...~ }
so mv apple.* will not work, because ...
2
votes
2answers
241 views
How to update a content management installation by overwriting existing files via ssh and shell?
I have installed a cms (modx) on a webserver running CentOS 5 and Apache 2.2. Now there is a new version and I would like to update it. The instructions in the modx-wiki suggest to overwrite the ...