The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
21 views

How To Copy Lossless from OSX ext to FAT32 without Ownership/Permissions? [on hold]

I sudo-copied documents from OSX extended filesystem to FAT32. Now, I see that two trees are different by size and by Stephen's command here vimdiff <(find /Volumes/fat32/ -printf "%P %u:%g %m\n" ...
0
votes
2answers
37 views

Copy and rename on collision

I'd like to merge the content of these folders with a command line. . ├── folder1 │ │ file.txt │ ├── folder2 │ │ file.txt │ └───folder3 │ file.txt How can I do this ?
10
votes
5answers
5k views

How do I copy a file from multiple servers to my local system?

We have multiple deployment of an application on servers such as app00, app01 and so on. I need to copy a single log file from all these servers onto my local mac so I can perform some grepping and ...
3
votes
3answers
311 views

Copy subfolders containing at least n files

I have a folder root_folder containing a lot of subfolders. Each of these subfolders contains a small number of files (between 1 and 20) and I want to copy all the subfolders containing at least 5 ...
0
votes
1answer
39 views

Copy files from Linux Server to Windows - bash script

i am trying to automate a simple process, but i m new and stuck. I have a number of bash scripts that when ran, zip and move files to specific directories on the linux box. I want to create a bash ...
3
votes
2answers
33 views

Prevent updates to 'modified time' when copying files to a mounted Samba folder

I don’t want the “last modified” attribute to be changed to the current date when copying files to a mounted Samba folder. How can I do this? This behavior occurs with (K)Ubuntu 12.04 and Ubuntu ...
1
vote
1answer
30 views

copy array with array name inside string in bash

In bash 4.3 script, I have variables: environment="local" config_local=("a" "b" "b" "d") copy_from="config_${environment}" I want to copy values from array with name stored in copy_from to another ...
0
votes
5answers
70 views

copy file from user to another in linux

I'm trying to copy a file from my home directory to another user's directory. I have a sudo access for the other user with no password. I tried doing something like: sudo secondUser cp ...
0
votes
2answers
663 views

putting files in subdirectory while making tar

I am trying to make a tar file. I have 2 folders that I need to tar. let me clear my question. folder 1. /temp1 folder 2. /temp1 now I want my tar output to be such that when i untar it i get ...
1
vote
1answer
51 views

How to copy files from one directory to another so that only new files are copied? [duplicate]

How would it be possible to copy all new contents from one directory to another so that only new files are copied from the source directory (both directories have the same naming tree). For example, ...
-4
votes
1answer
41 views

how to move all files under one directory to home directory

I have the script files script1.ksh ...script10.ksh in the directory star2 PATH : home/aaa/star2 I need to move all the files under star2 to the home directory (home/aaa) NOTE : I do not want the ...
12
votes
6answers
13k views

Copy-paste for vim is not working when mouse (:set mouse=a) is on?

I was trying to copy paste something from vim to another application and also, from that application to vim using right click with mouse and then copy and paste (or with Ctrl+v and Ctrl+c and also ...
1
vote
0answers
11 views

Copy a driver to other kernel?

I have installed RemixOS on my Laptop (sony vaio SVF 1521V1EB) but the Wifi is not working... However I could make it working on Ubuntu, so my question that am I able to copy the module files from the ...
-5
votes
2answers
66 views

Copying file from one directory to another directory [closed]

So I have this directory called CS under my home directory. Under CS, I have 3 directories called "Q", "W", "E". I want to copy a file in "Q" into "W", but I'm having trouble. I tried numerous cp ...
1
vote
1answer
248 views

Why can't I copy symbolic links?

cp: cannot create symbolic link ‘/xyz/pdq’: Operation not permitted So, I'm trying to copy one directory to a Veracrypt encrypted USB stick. Command I used was: cp -aL /source /destination I've ...
1
vote
1answer
23 views

ZeroCopy using commandline

Does any of the standard copy mechanisms take advantage of zero copy? Ex. cp, rsync
2
votes
2answers
81 views

Move file/table by averaging a column

I have the following program that allows me to move a file (actually a table) if the value of the first line of the fourth column is the highest one (in comparison with 8 other files having the same ...
30
votes
11answers
40k views

Is there a faster alternative to cp for copying large files (~20 GB)?

I am a graduate student, and the group in which I work maintains a Linux cluster. Each node of the cluster has its own local disk, but these local disks are relatively small and are not equipped with ...
3
votes
5answers
607 views

Copy Sequential Files

I have 12 files named dmp_000, dmp_001, etc, all the way to dmp_011. I would like to copy all of them to rdmp_000, rdmp_001, and so on, sequentially so the numbered files coincide. There must be an ...
0
votes
2answers
25 views

try download a file from server if the pathname is known

I access a webpage by this url http://someRandomName.no.meaning:20025/hello.html The location of the hello.html that is displayed is /var/some/fulder/hello.html. (I mean in the server it is ...
0
votes
0answers
38 views

Light file copy with diff

Is there a way to copy a file by creating another instance of it, that is not created as a hard copy, but by a link with the difference that any edit to that file will be saved in an diff file? I ...
12
votes
2answers
17k views

Better way to copy multiple directories to new directory

Is there a better way on the command line to essentially accomplish the following but with a single command cp -r css/ ar/ cp -r images/ ar/ cp -r js/ ar/ cp -r backups/ ar/ I've just been ...
0
votes
1answer
14 views

If you are streaming a remote video and start to copy it locally, will it use the same bit steam for the copy

An mp4 video is on computer A. From computer B, I open an smb://computerA connection, then start watching the mp4 video. It's slow, so I decide to copy it while watching over the same smb connection ...
13
votes
7answers
5k views

Make disk/disk copy slower

Is there a method of slowing down the copy process on Linux? I have a big file, say 10GB, and I'd like to copy it to another directory, but I don't want to copy it with full speed. Let's say I'd like ...
14
votes
5answers
11k views

How can I copy a file and create the target directories at the same time?

I want to cp aaa/deep/sea/blob.psd to bbb/deep/sea/blob.psd How do I do the copy if the deep and sea directories don't exist under bbb so that the copy both creates the directories that are needed ...
12
votes
3answers
3k views

How to copy a directory recursively using hardlinks for each file

I want to create a "copy" of a directory tree where each file is a hardlink to the original file Example: I have a directory structure: dirA/ dirA/file1 dirA/x/ dirA/x/file2 dirA/y/ dirA/y/file3 ...
-2
votes
3answers
400 views

Understanding permissions properly for cp [duplicate]

I am trying to understand the permission usage for the cp command in unix. What are the permissions required for copying a file into a directory What are the permissions required for copying out of ...
1
vote
1answer
21 views

copying sub-directories not containing a specific file into another directory

I have a directory named dir1 which has about 800 sub-directories named disp-001, disp-002, ... disp-800. I get the list of sub-directories that does not contain a file stdout based on solution given ...
0
votes
1answer
76 views

How to copy and rename file listed in TXT file?

I need to copy all files listed in TXT file from one location to another location. /1132526906_tt_nad87_1.jpg /thumb/t1132526906_tt_nad87_1.jpg /1132526906_tt_nad87_10.jpg ...
1
vote
1answer
245 views

Copying Tapes Data to Disk [closed]

Is there any command which serves as copy paste option: ABC on tape is copied as ABC on disk, without assigning a self label/name rather using the native file name. I am using DD, TAR and Tcopy (for ...
0
votes
2answers
296 views

How do I archive a folder keeping owners and permissions intact?

Is there any way to archive a folder and keep the owners and permissions intact? I'm doing a backup of some files, which I want to move using a usb-stick, which has a FAT filesystem. So the idea was ...
0
votes
2answers
152 views

Copy files with different names from different directories

I am trying to copy multiple files with different names from different directories, to one same new directory. The names of the directories are the same as the beginning of each filename. For example ...
1
vote
3answers
289 views

How to copy contents of a (large) vim file to the OSX system clipboard to paste in other apps?

I like to use vim to edit other (non-programming languages) stuff. So I paste the content into vim and make the changes. How can I copy all of the text back into the primary clipboard for pasting? ...
1
vote
2answers
119 views

copy recursively skipping directories with specific name

I have a directory with ~100 Gb. I need to copy this directory to other place skipping specific folders (there is a lot of them). The following is a wrong code to demonstrate my needs. $ cp -r ...
1
vote
3answers
75 views

script for copying directories with particular increment

I have directories which are named as 0.1, 0.15,0.2, 0.25, 0.3,0.35 and so on. Now I want to copy directories at particular increments say of 0.1 together to a separate directory. Say directories ...
1
vote
1answer
173 views

What is the actual process name when nautilus is copying files?

I am copying some files from an external drive to my desktop running Ubuntu. I can see the "File Operations" dialog which shows copying process. How do I find this particular process in ps aux | grep ...
0
votes
2answers
25 views

not able to copy after login to remote server

Below is my code to copy one folder from one path to another path after login to remote server. Problem I am facing, once after login to remote server I am not able to copy the source directory to ...
4
votes
2answers
244 views

Copy the files automatically to destination as soon as created

Is there any way to copy the file in Unix as soon as it is created? I have one location where files will be created in different timings.How can I copy the files automatically using shell script to ...
1
vote
2answers
92 views

Copy contents of remote server folder to current server?

I've been searching and I cannot find an answer on any of these sites that will work. I want to copy all of the contents of this folder to my server. Which Linux command should I use to do that? I ...
3
votes
2answers
666 views

How to skip special / socket files during rsync transfer?

Using the following command. rsync --archive --delete --partial --progress --recursive --no-links --no-devices --quiet source target Using --no-links and --no-devices already. Getting the error ...
2
votes
2answers
342 views

cp won't work on current bash script's directory

I'm trying to copy some files from current directory in a bash script but the problem is that the cp command doesn't work with the current directory. I can use the following command without any ...
0
votes
2answers
85 views

selectively moving partially matched files to different directories

I am working in linux server where a parent directory I has 100s of partially numbered files, e.g GGG12345_abb.txt GGG12346_abc.txt GGG12347_cbx.txt . . GGG19045_jha.txt each of which is ...
2
votes
2answers
113 views

copy files from the parent location when I am inside a symbolically linked folder

Suppose I have created two folders in /tmp called parent and child. child contains a file called test-child.txt and parent contains a file called test-parent.txt. Now lets go inside the parent and ...
2
votes
2answers
2k views

Verify file integrity by comparison with original file

I'm copying 1TB of a FreeNAS Server to a USB External Drive, I'm doing it with "cp", and after the copy has finished, I want to compare the files from original files to the copy one. Is this ...
8
votes
5answers
2k views

Why specify block size when copying devices of a finite size?

In online tutorials it is often suggested to use the following command to copy a CDROM to an iso image: $ dd if=/dev/dvd of=foobar.iso bs=2048 Why must the byte size be specified? I notice that in ...
1
vote
1answer
339 views

Find all the modified svn files and copy files modified in the same folder structure

I get all the modified svn files using svn st | grep ^M command M student/includes/class_student_promotion.php M student/includes/class_student_report.php M ...
1
vote
3answers
119 views

Replace bunch of files maintaining path

I have directory A and B. Each of them contains another directory with item.json inside. Only item.json file is persistent in directories so I cant copy-paste the directories. A: ./path/Item ...
0
votes
1answer
90 views

how to move many subfolders to parent directory? [duplicate]

I am doing some mathematical calculations using basic (embarrasing) parallel computing. There is a parent directory called calculations/ in which many directories are created that are called ...
3
votes
1answer
681 views

Add content one file to another

FILE1=$1 FILE2=$2 if [ ! -e "$FILE2" ] then touch $FILE2 fi while read line; do if grep -q "$line" $FILE2 then echo else echo $line >> $FILE2 fi done < $FILE1 I want ...
2
votes
2answers
90 views

How-to overwrite directory on multiple places with 1 source directory

So today I encountered one of my PHP files was outdated so I've got to overwrite the phpthumb directory on the entire server. Multiple websites use this folder on multiple unknown locations, so how ...