The Open Source Swiss Army Knife
/unix/commandline/
/unix/commandline/
+
sub-categories
http://www.sirfsup.com/
web directory content
Not logged in
Chat
Register
Login
unix
sql_servers
cryptography
code
web_servers
xml
programmingToolBox
miscellany
windows
web_design
return to:
http:/www.sirfsup.com
/
unix
/
commandline
Permalink:
cp.htm
Title:
add
article options : please login
|
print view
cp command
cp
to copy from netscape
cp
cp -r
copies recursively
cp -r home/* .
copies all files from the home directory 'here'
cp -p
preserves modification timestamp and the permissions
cp -rp /home/jane .
copies all files and subdirectories under /home/jane into ./jane/ AND retains original permissions and modification times
cp -r * backup
will create an infinte loop if backup is a directory in the current directory, as it will create backup/backup/backup ad infinitum
cp -aPv * newdir/
does same as `cp -rp`
find . -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp --parents --target-directory=new "{}" \;
that funky `cp --parents --target-directory=new` stuff keeps original directory structure
mkdir -p ../apache_1.3.27/src/modules/dav; cp libdav.a mod_dav.c mod_dav.exp Makefile.tmpl Makefile.libdir libdav.module dav_shared_stub.c ../apache_1.3.27/src/modules/dav
copying from netscape
type f7 then C-y in emacs and the selection will be copied-and-pasted into emacs from netscape.
Leave a Reply
Your Name:
anonymous
Your Email:
Website:
Comments:
The author will be notified of your reply.
return to top