I have a folder in my Desktop. I want to copy it to my server in Terminal.
I tried this unsuccessfully
[~/bin]# cp -r /Users/Sam/Desktop/tig-0.14.1 ~/bin/
cp: cannot stat `/Users/Sam/Desktop/tig-0.14.1': No such file or directory
[edit]
I run the command in my server. The problem seems to be in the fact that "/Users/Sam/Desktop/tig-...
cp -v -ur path/to/jsps/ /dest/path/
The above command copies all of the files that have been updated from the source directory to the destination, preserving the directory structure.
What I can't figure out is how to copy only *.someExtention files. I know that you can use something like:
find -f -name *.jsp -exec some awesome comman...
It is an odd behaviour seen only on Solaris that when I try to copy a symbolic link with the "cp -R -P" command to some other folder with a different name, it copies the entire directory/file it's pointing to.
For example:
link -> dir
cp -R -P link folder/new_link
...
Here is what I tried but failed:
[root@file nutch-0.9]# cp -f urls-resume /nosuchdirectory/hi.txt
cp: cannot create regular file `/nosuchdirectory/hi.txt': No such file or directory
[root@file nutch-0.9]#
besides,any way to make ">" work that way,say to create a directory when need?
[root@file nutch-0.9]# echo test > /nosuchtest/hi.t...
I have my dev files at ~/bin/, while my Git repo files at ~/github/myProject/. I always run the following file to copy files from the former location to the latter one:
#!/bin/zsh
# editors# {{{
cp /Users/Masi/.emacs /Users/Masi/gitHub/MasiDvorak/
cp /Users/Masi/bin/editors/emacs/* /Users/Masi/gitHub/MasiDvorak/editors/emacs/
cp /Use...
How can you copy a folder to /var/www without sudo?
My folder codes has the following permissions at /var/www
4 drwxr-xr-x 8 root root 4096 2009-08-09 03:01 codes
I can only sudo cp -r ~/Dropbox/codes/ /var/www to copy the files.
I cannot copy them without sudo.
...
I am a newbie in php, mysql. I have written a hello.php script, which I am trying to copy into /var/www directory (and will later want to open it through web browser). The problem with the same is that I am not allowed to save/write any files in /var/www despite me being the root. I tried implementing steps in this question, but I get th...
I have a small PHP script I wrote to help me push changes from staging to production. I run both staging and prod on the same server so my script copies changes from staging folders to prod folder.
This has been working fine until today when I had a few instances when files were only partially copied over resulting in some down time....
Linux: I want a command (or probably an option to cp) that creates the destination directory if it does not exist.
Example:
cp -? file /path/to/copy/file/to/is/very/deep/there
...
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
...
I have a cronned "cp *.html" command that runs every minute on an OSX box. The source files are regenerated from a database and written to the source directory just fine. The cp command usually picks them up and refreshes the copies in /Library/WebServer/Documents (this is for a quick-and-dirty internal website that monitors one of our...
Greetings,
While I've gotten many answer off this site, this is my first question, and I'm kinda excited about it... :)
I've written a script that cleans up .csv files, removing some bad commas and bad quotes (bad, means they break an in house program we use to transform these files) using sed:
# remove all commas, and re-insert t...
I have a C code..
i which I have following code for UNIX:
l_iRet = system( "/bin/cp -p g_acOutputLogName g_acOutPutFilePath");
when I am running the binary generated..I am getting the following error:
cp: cannot access g_acOutputLogName
Can any one help me out?
...
Hey, not 100% sure what this error means.
% for f in "*" ; do cp $f ../backup/backup$f ; done
cp: ../backup/backup* not found
The purpose is to copy all the files into a folder into a backup folder and rename the files to backup.
...
I just learned that cpio has three modes: copy-out, copy-in and pass-through.
I was wondering what are the advantages and disadvantages of cpio under copy-out and copy-in modes over tar. When is it better to use cpio and when to use tar?
Similar question for cpio under pass-through mode versus cp.
Thanks and regards!
...
Hello -
I have three directories. I would like to compare directory1 with directory2, then take those changes/new files and copy them over to directory3. Is there an easy way to do this, maybe by using linux diff and cp commands? I'm open to ideas.
Thanks!
Andrew
...
In Ubuntu if a file /A/largefile.foo is moved via 'cp' or 'mv' to /B/largefile.foo, how can I ensure that the entire file is written before attempting to move the file a second time to /C/largefile.foo?
Case:
1. An remote automated Script X begins an rsync to destination folder A of a very large file.
2. A cron job on the local machin...
Osx mv and cp does not have the --parents option, so how does one emulate it ?
I.e. mv x/y/a.txt s/x/y/a.txt when s is empty gives a no directory found error unless one does a mkdir first which is rather cumbersome when trying to do this did thousands of files.
...
What is the advantage of using
git archive master/foo | tar -x -C ~/destination
to deploy a copy of /foo vs. just copying from the the working copy with
cp foo ~/destination/foo
So, unless for some reason you don't want to copy everything over from that sub directory foo in master (or whatever branch you happening to be working o...