Tagged Questions
0
votes
4answers
56 views
concatenating multiple files with multiple headers
Im trying to concatenate multiple files with multiple headers to have one file with all the information in it for example.
File 1:
Numbers
1
2
3
Letters
A
B
C
File 2:
Numbers
4
5
6
Letters
D
E
...
2
votes
1answer
92 views
Copying a working Linux instead of installing a new one [duplicate]
It is possible to move an installed Linux from one drive to another or from one disk to another by two methods:
dd command which copies sector by sector including boot sector
cp command, and then ...
9
votes
3answers
712 views
How does “cp” handle open files?
I'm having two separate directories. The user loads a file into the first. Theres a cronjob running in the background which copies the files every 5 minutes over to the second directory.
What happens ...
4
votes
2answers
755 views
Difference between cp -r and cp -a
Looking for the difference between cp -r and cp -a? What does recursive mean in terms of copying files from a folder?
0
votes
3answers
1k views
How do I cp the folder, not just the folder content?
Let's say I have folder structure like this:
/parentFolder/
folder1/
folder1.1/
file1
folder2/
file2
How do I copy folder2 inside folder1.1 so that file2 is also in
...
2
votes
2answers
2k views
How can I selectively copy files from one directory to another directory?
On Linux, how do I selectively copy most – but not all – files from a directory (dir1) to another directory (dir2)?
I do not want to copy *.c and *.txt files to dir2.
The cp man page ...
19
votes
3answers
5k views
Difference Between cp -r and cp -R (copy command)
cp- r is meant to copy files recursively, and cp -R for copying directories recursively. But I've checked, and both appear to copy both files and directories, the same thing. So, what's the difference ...
1
vote
2answers
689 views
Is there a BASH command for copying all files from a directory tree and putting all the files in a single directory?
I have a ton of notes categorized into folders, but I think it might be better to put them all into one folder instead. Is there an easy way to do that?
9
votes
3answers
4k views
copy recursively except hidden directory
How do I copy recursively like cp -rf *, but excluding hidden directories (directories starting with .) and their contents?