The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
23 views

rsync a list of directories with absolute path in text file

I have a text file containing a list of directories with its absolute path $ cat DirectoriesToCopy.txt /data/Dir1 /data/Dir2 I want to use rsync to copy all these directories preserving its ...
-1
votes
3answers
45 views

How do I copy a file from one linux machine to another over network? [closed]

I have two machines running linux, both in the same network. I need to copy a file from one machine to another. How do I do that? Also a subquestion: Is it possible without knowing any user and ...
2
votes
1answer
21 views

Repetition of password while rsync-ing files?

I'm using a script to download files in two steps: First, I'm downloading a file containing a list of files from a server to my host machine using rsync. Then, I'm using rsync to download the ...
0
votes
2answers
57 views

Download n Upload files via telnet session

I have an attendance Device with Linux OS installed. I am able to connect that device via telnet session. There are some files in the device which I need to download and upload with new files. How can ...
1
vote
0answers
25 views

rsync copy only files facade [duplicate]

Is there a way to mirror a directory structure and files there contained with rsync, giving out facade zero length files? I mean, mirroring dirs (-d flag I think) exactly as they are, while not ...
0
votes
1answer
39 views

Copy files from USB flash drive to root in OpenBSD

I have OpenBSD 5.6 installed on my notebook computer and would like to copy files from my USB flash drive to the root of the installed OS. I figured out how to mount the USB drive using these ...
2
votes
0answers
55 views

Copy folders at once

I want to copy a large number of folders at once not one by one. Is it correct to use the following code ? Is it helping to run the command cp for all the folders i at once? #!/bin/bash foreach i in ...
1
vote
0answers
12 views

File transfer help with Ubuntu and ESXi

I have two esxi machines that I want to directly transfer files between. Is there a way I can facilitate that transfer from a third machine that I have Ubuntu 14.04 running on?
0
votes
2answers
79 views

How to transfer file from windows to Unix Machine

I am working in Windows machine I have connected to Unix Machine using Putty, I want to transfer file from my local Windows Machine to Connected Unix Machine, Please suggest what is the command,
2
votes
1answer
32 views

Problem with install command to copy a whole directory

So I have a repo with some of my config files and I'm trying to create a makefile to install them in the homedir. The problem I have is that when I run the following command straight in bash install ...
4
votes
3answers
624 views

Multithreaded cp on linux? [duplicate]

Is there a multi-threaded cp command on Linux? I know how to do this on Windows, but I don't know how this is approached in a Linux environment.
1
vote
1answer
52 views

Linux command to copy as hard links, while deleting unwanted files?

I'm looking for a command that behaves both like cp -al in only creating hard links rather than copying file contents, and rsync -a --delete in removing files from the destination that are not ...
3
votes
1answer
288 views

mv and cp directory hierarchy? [duplicate]

Can I also move or copy directory hierarchy of a file when I mv or cp the file? For example, if I mv or cp dir1/dir2/file elsewhere, it will only mv or cp file. What if I want to also mv or cp ...
1
vote
0answers
34 views

Copying files to a directory shared via ACL doesn't get default mask

I'm trying to setup a simple shared directory on an ext4 filesystem for a group of users to work on. Let's say i just need to give all permissions to all users belonging to the group "workgroup" to ...
1
vote
1answer
61 views

Replace cp function by rsync [duplicate]

I'm trying to replace my cp function by an rsync function My cp function is the following find /home/odroid/USBHD/Movies/ -iname "*.mkv" -mtime '-1' -exec cp -n {} /home/odroid/NASVD/Movies \; do ...
1
vote
1answer
104 views

FTP “put” not copying file to remote host when ran from shell script but copies the file to remote host when ran manually

ftp -n ${FTP_HOST} << STOP user ${FTP_USERNAME} ${FTP_PASSWORD} binary lcd ${FTP_FROM_DIR} cd ${FTP_TO_DIR} put ${reportFileName} STOP That is my code which is not ...
2
votes
1answer
46 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. ...
2
votes
3answers
215 views

Copy files by date/time order contained within filename?

I have a bunch of files with a pattern like this: {UID}-YYMMDD-HHMMSSMM-NEW.xml Or a real example: 56959-140918-12465122-NEW.XML I want to copy these files to another directory in date and time ...
4
votes
5answers
851 views

Clone directory tree structure and copy files to the corresponding directories modified after a specific date

I have a folder with more than 30 sub directories and I want to get the list of the files which was modified after a specified date(say sep 8 which is the real case) and to be copied with the same ...
5
votes
2answers
117 views

Is there a better way than cp to copy millions of files while preserving hard links?

So in this story on the GNU coreutils ML, someone used cp to copy 430 million files and needed to preserve hard links, and just barely got it to finish after 10 days. The big problem was that, in ...
6
votes
2answers
84 views

Operations only on complete files [duplicate]

I have machine on which the files are uploaded by ftp. From this machine I would like to run cronjob and scp/rsync (simply copy them) to different machine in the same network. The problem is I don't ...
0
votes
1answer
107 views

Is it possible to use dd to clone only the part of the hard drive which is used?

if only 1/3 of a 300GB hard disk is used. Is it possible to use dd to clone the drive (but only the 100GB that is used)? dd if=/dev/sda of=clone.img
0
votes
0answers
21 views

Prime New GlusterFS Cluster w/ 24GB of Files

I am attempting to load my new glusterfs cluster on AWS with my existing files that total in size of over 24GB. From my calculations, it is going to take 8 days to transfer all the files via the ...
2
votes
2answers
134 views

find file, copy but with different name

I have files with random numbers in /home/user/files folder (every 4 days I have new ones). for example: john20 john25 john40 tom12 tom32 simon2 simon8 simon53 I want to take only last modified ...
16
votes
2answers
823 views

Why is this binary file being changed?

I am trying to copy files over SSH, but cannot use scp due to not knowing the exact filename that I need. Although small binary files and text files transfer fine, large binary files get altered. Here ...
1
vote
2answers
68 views

How use minimum number of commands to copy all .txt files from all subdirectories to one directory?

I have more than 90 subdirectories and inside each one, there will be a number of .txt files. What I need to do is to copy all those txt files out to one single directory. How can I do that?
4
votes
2answers
431 views

How To Synchronize Directories in two different external hard disks?

I have few big folders "cosmo_sim_9", "cosmo_sim_10".... in one of my external hard disk, and a old copy of this on another external hard disk. I want to Synchronize old directories with the new ...
1
vote
3answers
531 views

How to copy-merge two directories?

I have two directories images and images2 with this structure in Linux: /images/ad /images/fe /images/foo ... and other 4000 folders and the other is like: /images2/ad /images2/fe ...
2
votes
1answer
56 views

Is there a system call to bind a file descriptor directly into another?

A read() & write() loop would probably be as good as what I'm looking for, but nevertheless is anything like that around or is it impossible because of an obstacle I didn't envisage ? I'm curious
0
votes
2answers
67 views

Copy directory not just the contents

I want to copy a directory into another directory. For example, cp -r dir1 dir2 copies the contents of dir1 into dir2. I want to copy dir1 itself into dir2 so that if I ls dir2 it will output dir1 ...
2
votes
2answers
293 views

Bash copy all files that don't match the given extensions

When I import pictures from my camera in Shotwell, it also imports the video clips. This is somewhat annoying, as I would like to store my videos in another folder. I've tried to write a bash command ...
3
votes
4answers
247 views

The most *robust* remote file copy?

How would I go about to copy files over a very unstable internet connection? Sometimes, the connection is lost, other times the IP of one machine or the other machine is changed, sometimes both, ...
0
votes
1answer
190 views

Connect psftp between Unix and Windows server

I need to transfer files from Unix to Windows server. After creating a folder in the windows server files need to be copied from Unix to Windows. I am using psftp to do this process.So, I am trying to ...
3
votes
3answers
1k views

Copy a file and overwrite the existing file

I have two images (image1.png and image2.png) in the same folder on my server, I want to run a command that overwrites image2.png to image1.png. I prefer to overwrite the image instead of deleting it ...
2
votes
1answer
148 views

rsync to copy files which has changed

I need to copy some files from a particular directory to a different location on a daily basis. I want to copy the changes only, so planning to use rsync. These files follows the following naming ...
2
votes
1answer
84 views

rsync specific directories

Below are the directories of my directory structure. I only want to run rsync on the content under the archive directory of any subdirectory and exclude everything else: ./ ap/ ap/aploader/ ...
1
vote
3answers
542 views

copying files with particular names to another folder

I have a folder with a lot of files. I want to copy all files which begin with of these names (separated by space): abc abd aer ab-x ate to another folder. How can I do that?
1
vote
2answers
5k views

Java code to copy files from one linux machine to another linux machine

I'm looking for java code to copy files to a remote linux system. I have tried Runtime.getRuntime().exec() function by passing an scp command, but each time I run the program it is asking for the ...
2
votes
4answers
229 views

Copy files and directory tree for filesize in specified range

Hi I would like to make a small script copying files from different directories example /pp/01 /pp/02/ etc... to another destination with the same directory design. But only those files within the ...
1
vote
0answers
528 views

Copy files to parent directory using relative pathnames [closed]

If I'm in the current working directory of oxford. How would I copy outline.doc, and place it into the sample_dir directory using relative pathnames? I've tried cp outline.doc ../outline.doc
1
vote
0answers
72 views

How to back-up files from nautilus retaining the time stamp?

I connected my android tablet (Asus fonepad7 me372cg) to laptop using usb cable. It showed up in nautilus in Ubuntu 13.04. I've to back-up the files in the tablet (specially the videos & photos) ...
1
vote
0answers
49 views

copy files from Google drive [closed]

I've installed a terminal on my nexus tablet and would like to batch copy files from a sub-directory in Google drive to my tablet's dcim directory. how do I do this?
3
votes
1answer
506 views

Copy a local file to a remote server, non-root privileges over sudo?

I'd like to do something like: scp local_file remote_server:/some_directory But in order to gain privileges to /some_directory, we need to call sudo. I know that a similar question had already been ...
7
votes
5answers
575 views

copy smallest files first?

I have a large directory containing subdirectories and files that I wish to copy recursively. Is there any way to tell cp that it should perform the copy operation in order of file size, so that the ...
1
vote
2answers
3k 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 ...
3
votes
2answers
99 views

Can I safely read a file that is appended to by another process?

If process A copies files to some location loc and process B regularly copies the files from loc to some other location, can B read a file that is currently in the process of being copied to loc by A? ...
2
votes
3answers
104 views

how to synchronize two directory?

I want to using crontab to synchronize two directory between my linux partion and windows partion like this: 24 9 * * * cp -r /home/fan/Data /media/T/Data But it would create a directory named ...
16
votes
7answers
5k views

How do I copy multiple files by wildcard?

I have a folder with a number of files in it ABC.* (there are roughly 100 such files). I want to duplicate them all to new files with names starting with DEF.* So, I want ABC.Page1 ABC.Page2 ...
0
votes
0answers
83 views

My computer beeps while copying files

Whenever I create disk activity on my memory stick, my headphones create very annoying beeps at various notes. It doesn't happen with my in built speakers, and it hasn't happened before. I'm on Ubuntu ...
1
vote
1answer
497 views

Symlinks and permissions in backup archives

I installed linux on another computer and I want to move my /home directory to that computer. I want to backup that directory with any file permission, symlinks etc. how should I do it? Are there any ...