Skip to main content

Questions tagged [cp]

cp - Command-line tool to copy a file

3 votes
2 answers
215 views

I want to preserve Access, Modify and Birth timestamps when copying files. I tried the following flags. rsync --atimes --times --crtimes --archive However I get an error that crtimes is not supported....
New to code's user avatar
6 votes
1 answer
764 views

How to create an archive containing links and the linked files. I have some shared libraries of which I want to create an archive. This is what I tried mkdir dest #abc.so is a link file which points ...
Harry's user avatar
  • 239
-1 votes
1 answer
170 views

Why does cp need -r flag to copy "recursively"? Why doesn't cp automatically copy directories recursively? Would that make more sense? Is there some documentation that explains this decision?...
how to bash's user avatar
0 votes
1 answer
92 views

I need help copying a large bunch of files. Let me try to explain the problem here SOURCE STRUCTURE is in /home/user/ToddCrimson/Pictures/iPhone-Media/ (It has JPGs, PNGs, MOVs etc, so I will need a ...
Todd Crimson's user avatar
0 votes
0 answers
89 views

BSD cp: -a Archive mode. Same as -RpP options. Preserves structure and attributes of files but not directory structure. -P No symbolic links are followed. This is the ...
jsx97's user avatar
  • 1,377
0 votes
0 answers
51 views

I have a script that behaves weirdly when executed from systemd if I use cp instead of cat. My script: #!/bin/bash steamcmd +login anonymous +app_info_update 1 +app_info_print 3017300 +quit | grep -Po ...
Sunyata Nothing's user avatar
0 votes
1 answer
130 views

What is the difference between cp /tmp/a ./ and cp /tmp/a . (i.e. with and without the trailing slash in destination)? They both mean copying /tmp/a to current directory, but I see some people insist ...
LennonLam's user avatar
  • 111
5 votes
1 answer
1k views

I have cp (GNU coreutils) 9.5 on Arch Linux. The help seems to claim it has a --update=none-fail option, which will fail if a destination file already exists: $ cp --help | grep '\--update\[=' -A1 --...
rcorre's user avatar
  • 153

15 30 50 per page
1
2 3 4 5
53