Questions relating to the Linux 'cp' command.

learn more… | top users | synonyms

0
votes
1answer
22 views

how to copy directory with wildcard to another folder

i need to make a cron that copy folder on /home here is the content of my /home fina f-logistik folder-surat-jalan zone-A zone-B zone-C zone-free what i need to copy is only folder that start ...
0
votes
2answers
30 views

Can't find copied files

I used cp to copy files to a directory which didn't exist. I have no clue where they went to, and the worst part is it filled up my primary 120gb ssd so I can't make any changes to anything. Where ...
1
vote
2answers
44 views

Recursively copying files

How can I copy *.txt files only from a directory and all its children directories? Say I have a folder A containing .txt files and subfolders B C etc that contain .txt files and so on and I just want ...
1
vote
1answer
40 views

Copy all files whose hashes don't match

I currently have a hash list (known good) of a selection of various files. I want to copy all files when their hashes do not appear in the hash list to a separate directory. I have got the md5deep ...
0
votes
1answer
43 views

How to do ant style file filtering when copying files

With Ant you can use a filter like: **/target/*.war That means all the paths that have target in them as the last directory. This will match a/b/target/X.war a/target/Y.war a/b/c/target/Z.war ...
1
vote
1answer
57 views

Argument list too long and copying to Samba Share

Ubuntu 12.04 LTS 64 bit. I'm trying to make a scheduled task copy from a directory with thousands of files to a samba share (while skipping duplicates). I mapped my Samba share through the GUI. ...
2
votes
1answer
456 views

Copy only folders not files?

Is there a way to copy an entire directory, but only the folders? I have a corrupt file somewhere in my directory which is causing my hard disks to fail. So instead of copying the corrupt file to ...
0
votes
2answers
240 views

How to move between 2 very different directories in the terminal?

When I move files with a GUI file manager, I navigate to the source and destination directory in 2 different windows, and then drag and drop. Is there a way to do this in BASH (move a file to a ...
0
votes
1answer
1k views

USB drive - cp: cannot create regular file, Read-only file system

I am able to copy files from a USB flash drive, but I cannot get the data (files) into the flash drive. It is showing: cp: cannot create regular file `PENDRIVE/12_angrymen.avi': Read-only file system ...
1
vote
1answer
5k views

cp command to exclude certain files from being copied

Is there a way to use command 'cp' to copy a directory and exclude certain files/sub-directories within it?
0
votes
0answers
35 views

Help copying a file from home directory onto a server [duplicate]

I'm trying to copy a file from my directory into a folder on my website so that I can insert the picture using in my html file. Can someone please help? My command is (I'm in the pictures directory ...
0
votes
1answer
417 views

Removing specific characters in string

I am currently writing a bash script and I have obtained a list of file locations. However I have notice that some file locations have spaces in the file name such as eg. : /1 2 3.txt Such files ...
0
votes
0answers
2k views

Can't copy file (I/O error) Ubuntu Server

I'm running Ubuntu Server 12.04, and basically found out that a couple of files aren't behaving like they should. The file name is r.-1.-1.mca, and I've tried using this terminal command sudo cp ...
1
vote
2answers
706 views

Why does cp not copy files?

$ ls -la /tee/mysql total 28675 drwxrwxrwx 1 root root 448 Jun 25 13:52 . drwxrwxrwx 1 root root 2896 Jun 25 12:12 .. -rwxrwxrwx 1 root root 18874368 Jun 25 13:19 ibdata1 -rwxrwxrwx 1 root ...
1
vote
3answers
3k views

How to copy a directory from one hard drive to another with every single file?

I have a folder I just luckily recovered sitting on: /media/sdc1/Pictures with a BUNCH of subdirectories and files that I need. I want to copy these to a folder on: /media/sdb1/Pictures What ...
2
votes
2answers
1k views

Copy the content/file to all subdirectory in a directory using terminal

I wanna copy a file to all sub-folders of a folder. A command example would be very helpful.
0
votes
5answers
582 views

Copy files from a directory to a sub-directory (excluding the sub-directory itself)

I have created a folder(directory) named 'Parent' which contains several files(namely 'file1', 'file2'...'file100') and a sub-directory named 'Child1'which itself may contain files and folders . ...
0
votes
2answers
2k views

Copy file to External Hard Disk

My UBUNTU (desktop part) does not boot completely because of low disk space; I logged in to terminal using my username and password, try to copy some file from /home/UserName/Desktop to my external ...
4
votes
2answers
5k views

Ubuntu copying file problem (cannot stat file)

I've faced a problem when copying a file with the commands, cp ~/Downloads/sample.pdf ~/Desktop/ But the terminal gives me a message, cp: cannot stat 'sample.pdf': No such file or directory.
7
votes
4answers
1k views

How to copy into with cp if destination folder already exists?

Example... This is what I want. /tmp $ cp -f -R --verbose /tmp/a /tmp/b `/tmp/a' -> `/tmp/b' `/tmp/a/file2' -> `/tmp/b/file2' `/tmp/a/file1' -> `/tmp/b/file1' This is what I do not want. ...
0
votes
1answer
236 views

issue with cp command when i was copying in /var/www

i am not able to copy file in /var/www with sudo cp /home/index.html /var/www the error is cp:omitting directory '/home/index.html' then i used -r, sudo cp -r /home/index.html /var/www, then the ...
1
vote
0answers
54 views

cp hangs on certain Windows files

I am currently trying to use Ubuntu 9.04 live CD (it's what I had when my computer took a dump) to copy some Windows files from an old drive to a new drive. I'm using cp -Rvf source dest. The issue ...
0
votes
1answer
122 views

Copy entire filesystem in a folder where a raid-1 array is mounted

I am trying to migrate from a single disk drive system to a double disk drive software raid-1 system that already has a running system on it. Meaning that formatting and having a new installation of ...
4
votes
2answers
6k views

Can I verbose output during a copy command processing?

Situation: If I entered a copy command like cp -rf /src/ /dsc/ then I am waiting several minutes for copy large directories. I forgot to put -v flag to verbose an output, Can I do it during copying?
3
votes
2answers
7k views

External backup - “cp: cannot create regular file” error

I have always backed up my home directory to an external hard drive using the cp -r command. Until recently, it worked fine, but now I regularly get the error message cp: cannot create regular file ...