The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
2answers
28 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 ...
2
votes
1answer
35 views

top not showing the memory usage of cat

I wanted to generate some waste file of 50 GB. so i wrote this eightnoteight@mr:~/ while true; do > cat txt >> tmp > cat tmp >> txt > done and when i ran top,watch to observe. ...
4
votes
3answers
117 views

One-way-sync a directory, but leave deleted files deleted on the destination

I want to sync a directory between two systems. To make it more interesting the syncing must only be done in one direction, i.e.: if a file is deleted in the source directory, it must also be ...
2
votes
2answers
51 views

Copy a folder and its content to all Nginx vhosts host

I am interested to know if a single command line that would allow me to recursively copy a folder to all of our NGINX Virtual Host htdocs folders: I need to copy that folder to all hosts located in ...
1
vote
3answers
304 views

Full DD copy from hdd to hdd

UPDATE: 2 This seems a lot better than before (Thanks to Groxxda for the suggestions): sudo dd if=/dev/sdb bs=128K | pv -s 3000G | sudo dd of=/dev/sdc bs=128K ETA is about 9 hours for 3TB, whereas ...
4
votes
2answers
718 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 ...
0
votes
1answer
82 views

How to copy contents of command line search result in unix to a file?

I would like to accomplish the following. Copy the contents of all search results into a single file. I don't want to copy the search result but the file contents of the search result. For example ...
1
vote
5answers
338 views

Use SED or AWK to move string to new column and row

I have a .csv file that is tab delimited and I need to move the header row information to a "new" column at the beginning and a specified numbers of rows down. Please forgive any formatting errors for ...
1
vote
0answers
29 views

Disk copying with two OS on it

I want to change HDD in my laptop to bigger one. I have installed WIN XP and Mageia Linux and GRUB ver 1 as bootloader. So I want to use such procedure for copying and changing disk: plug new one ...
0
votes
1answer
76 views

Copy selected files had subtitutions in name

I have some folders: oldA with A_1.aaa, A_2.aaa, A_1.bbb, A.def, A.ghi oldB with B_1.aaa, B_2.aaa, B_1.bbb, B.def, B.ghi and so on and need to copy them to another folder with selection. I want ...
8
votes
4answers
766 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 ...
0
votes
1answer
8 views

Copy a directory containing links and their targets in Linux

I have a directory: /home/username1/dir_1 This directory contains two folders, folder_1 and folder_2. In folder_2 are links to files present in folder_1. Now, I want to copy dir_1 into ...
2
votes
1answer
214 views

Qemu Backing Files Question

If I'm creating a new.qcow2 qcow2 image based on a backing file (called base.qcow2) and the backing file is located on an nfs share. What happens if someone tries to modify, replace, or delete the ...
1
vote
2answers
2k views

copy files from one path to another path in linux

I am new to linux. I am trying to copy files from one path to another path. I have a text file which has all names of files in the following pattern: file-1.txt file-2.pdf file-3.ppt .... I created ...
2
votes
1answer
78 views

Transfer 2 drive raid0 / lvm2 system to new drive pair

I have a multi-boot, multi-drive system that I want to transfer onto 2 bigger drives. Currently pc has 2x1TB drives with Fedora 19 running, using RAID0 drive mirroring, with LVM2 on top of the md. I ...
7
votes
7answers
803 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 ...
3
votes
1answer
539 views

Best way to sync files - copy only EXISTING files and only if NEWER than target

I'm doing this sync locally on Ubuntu 12.04. The files are generally small text files (code). I want to copy (preserving mtime stamp) from source directory to target but I only want to copy if the ...
4
votes
2answers
1k views

CP: max source files number arguments for copy utility

Consider that there are countless number of files under /src/ cp /src/* /dst/ How many files cp will successfully process?
1
vote
1answer
97 views

Copy files via a complex ssh connection?

Suppose I have host A from which I ssh to host B, where I sudo -U some_role and from under it ssh to host C. My goal is an interactive shell on C. Assume that from C I cannot ssh back to A. What is ...
1
vote
2answers
361 views

Need to copy files to existing directory and remove files already there with the same name but different extension

EDIT: Total rewrite of question for clarity. I have a directory tree (new) with a bunch of files of with an extension of .new. I have an identical tree (old) where many of the files have names ...
-1
votes
1answer
314 views

How to recursively move batches of 20 files into numbered folders from folder of 1000 files

I have a folder full of 1000 (or more) files. I want to have a script that creates a numbered folder and then moves the first 20 files (ordered by name) into that folder. It should then do this for ...
3
votes
3answers
795 views

Merging two directory without copying the files

Let's say I have as follows : Folder A C1 file a A2 Folder B C1 B2 file b B3 What I want is to merge these two folders, which would give me : Folder C ...
2
votes
2answers
150 views

Take copy of TTY0 text

I have some output in TTY1 that I think might hold clues as to why my last GUI session froze (CtrlAltBackspace was able to get me back to the terminal and I reloaded the GUI). However, I cannot seem ...
2
votes
2answers
91 views

open a file and copy the listed files to another folder

I have a file named file1.txtcontaining file names like below : filea.txt fileb.txt filec.txt I want to copy the files listed in file1.txt to another folder. What is the UNIX command to use? (the ...
5
votes
2answers
590 views

Why do hard links seem to take the same space as the originals?

Thanks to some good Q&A around here and this page, I now understand links. I see hard links refer the same inode by a different name, and copies are different "nodes, with different names. Plus ...
6
votes
1answer
352 views

Is “zero-copy networking” implemented by default on Linux?

I saw this article: http://lwn.net/2001/0419/kernel.php3 Zero-copy networking will be in 2.4.4. This patch, by David Miller, Alexey Kuznetsov, and others, has been in development and testing ...
3
votes
1answer
4k views

copying files from one directory to another

I have to copy a set of files from one folder to another folder and I'm using the following command: cp -rf `head -n 100 /home/tmp/abc.txt` /home/tmp/test/files the file contents in abc.txt is ...
1
vote
1answer
68 views

Mass file+folder+directory move

So we have a bunch of src files that are old and out-dated and need to be moved to our new NAS storage. (I don't know why we are keeping them). Is it possible to copy all the files and folders with ...
0
votes
0answers
21 views

file modified while doing scp/cp [duplicate]

I'm doing scp to a database while it's active. Its not very critical but I would like to know what will happen to a file when it is modified in the middle of a cp process? Does it get corrupted or it ...
22
votes
10answers
12k 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 ...
2
votes
1answer
76 views

How can I make multiple copies of one folder without merging?

When two or more identically named folders are to be copied into or moved to the same location, the default option either in the GUI file manager, or using in a terminal cp -r --backup=numbered or ...
0
votes
2answers
64 views

Rsync after copy

Does Rsync after copy only send the differences between the folders, or does it copy the entire folder again since Rsync has never been implemented before on that folder?
3
votes
5answers
3k views

Find and copy directories containing file type

I have a directory "Movies" containing subdirectories "Movie Name". Each subdirectory "Movie Name" contains a movie file and related image/nfo files etc. I'm trying to copy all directories containing ...
0
votes
1answer
101 views

vi / vim - extra indents when pasting text? [duplicate]

I can copy characters in other apps such as browsers with ctrlc. I can then press i to enter insert mode in vim and press shiftctrlv to paste the text in. The problem is that each line gets indented ...
0
votes
2answers
166 views

How do I copy directories and symlink files?

I have got a directory of huge files (total ~ 1TB) and I don't want copy them around. However, I'd like to work around them, so it would be convenient to have them linked in a directory hierarchy I ...
2
votes
1answer
253 views

Unable to preserve ownership in a copy but able with a move?

I have noticed that I am unable to preserve ownership if I rsync -o files. However, I am when I move them. This is all without admin privileges. What is the rationale of this? Several threads e.g. ...
0
votes
1answer
258 views

Copy modified files from one server to other

Scenario: 2 Servers (*.12 and *.13) CakePHP "application" on both of them. *.12 is "Production" Server *.13 is "Development" Server Now i want to copy all files modified the last 2 days from test ...
4
votes
1answer
4k 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 ...
2
votes
1answer
423 views

Minimal command to make a copy of a file [duplicate]

I often find myself copy-pasting long path in order to create a copy of a file cp /path/to/file/file1 /path/to/file/file1.bkp Is there an alternative utility that will NOT require me to type the ...
3
votes
2answers
751 views

How to write file into another

I have an empty file (only zeroes are in it) of size 9,0KB and I need to write another file (with size 1,1KB) to it, but the first file must not lose its size or the rest of its contents. So if the ...
2
votes
5answers
302 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 ...
2
votes
2answers
13k views

Easy way to copy lines from one file to another [duplicate]

Possible Duplicate: cat line X to line Y on a huge file Very simple issue but can't seem to find a simple resolution! I have a massive text file from which I only need around 150 lines. ...
0
votes
1answer
471 views

How to copy a folder from remote machine to my system using ssh or any other way

Hi I need to copy a folder of size 885 MB from a remote machine to my system using ssh and port no is 1500 What is the command I can use to accomplish this path of remote folder is ...
6
votes
2answers
9k views

How do I copy a symbolic link?

I have a symbolic link to a file in one directory. I would like to have that same link in another directory. How do I copy a symbolic link? I tried to cp the symbolic link but this copies the file ...
4
votes
3answers
236 views

anyway to fail/delay a cp process?

This is a hypothetical scenario. Say that I have a particular folder that is being synchronized by a process which is receiving a files/folders via the internet. Now while this operation is in ...
12
votes
5answers
2k 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 ...