The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
2answers
96 views

How to copy a file partially?

I have a broken disk where I need to copy a 60G file from. From time to time the disk resets and I can't finish the copy. I would like to try and copy partial slices and put them all together. ...
1
vote
2answers
53 views

Copy .txt files in a certain directory

I have an issue in copying my file in my directories. I have .txt and .jpeg files in a lot of directories, and I want to copy only the .txt files according to the directory. For example, I have this: ...
-1
votes
0answers
31 views

Cant copy / delete files on usb partition

I'm currently running xubuntu 12.04 on my computer. I am having some problems copying files from my home folder to a usb drive with 8 GB. Now, i am having several problems like: the computer cant ...
4
votes
3answers
94 views

Copy from remote server which doesn't have rsync

I need to recursively copy a folder from a Ubuntu remote server where I have ssh access. I don't want to follow symbolic links, nor to copy permissions/owner/group, because my client system (Ubuntu ...
4
votes
4answers
208 views

How can I copy a file in a bash script and rename it while copying and place it in the same directory

How would I copy a file "file.doc" and rename it while copying to "file_copy.doc" and place it in the same directory ? And this only by calling the script and adding the file name in the argument: ...
5
votes
2answers
138 views

How to sync two folders with command line tools?

Having migrated to Linux from Windows, I would like to find an alternative software to Winmerge or rather learn command line tools to compare and sync two folders on Linux. I would be grateful if you ...
3
votes
1answer
65 views

Copy a file and append a timestamp

I've got two issues with my script that copies files and adds a timestamp to the name. cp -ra /home/bpacheco/Test1 /home/bpacheco/Test2-$(date +"%m-%d-%y-%T") The above adds Test2 as the filename, ...
1
vote
1answer
27 views

Copy a rolling “last 2 months” of files

I have a friend who is a photographer and she has a lot of large files as a result. Our current solution is where some files are delivered to my house. I don't have the storage capability to store all ...
0
votes
2answers
31 views

File transfer from AIX to Windows - CR and LF issues (Control Characters)

I have an issue transferring files between Unix(AIX) and Windows. I use the following mount command to mount a Windows folder on Unix. mount -v cifs -n /admin/@dmin -o ...
1
vote
1answer
25 views

Need a shell script for copying files that have long and out of capacity names

I have a directory on a NTFS file system which contains files with short and long names, I entered copy command for that directory to be copied on a Ext2 file system, files with short names copied ...
1
vote
3answers
76 views

How to copy lines from multiple files into one new file and keep file name?

I have 81 files in .fasta format that contain (up to) 53 items. Such as: /User/MyData/Sample_1.fasta /User/MyData/Sample_2.fasta .... /User/MyData/Sample_81.fasta Each .fasta file contains a name ...
0
votes
1answer
40 views

How do I copy all files that have been created or modified in the last 12 months?

I would like to copy all the files created in the last 12 months to a new folder leaving behind everything else. Including sub folders.
2
votes
0answers
32 views

Logrotate archive old log files which has date extention

Everyday a log file is created in my directory. But with time, there tend to be a lot of log files. I want to keep the latest 4 log files in .log format, and compress the rest and copy the compressed ...
2
votes
2answers
71 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 ...
3
votes
6answers
52 views

How to copy a folder structure and make symbolic links to files?

I have a folder SOURCE that contains several sub-level folders, each with its own files.. I want to copy this folder in a new folder COPY where I need to copy the directory structure but keep the ...
2
votes
1answer
41 views

copy files down the tree but only copy the files not the directories in target

example I have 100 folders each with JPG and MOV files in them I want to copy all the jpg into one folder and all the mov files into another example folder1 has one.jpg and two.jpg and one.mov ...
0
votes
2answers
43 views

How do I run find, maxdepth and other commands on lcd while using ftp?

I have got the command working locally using normal commands. I now need it to run while using ftp. I understand I need to use '!' And instead of copy I will need to use put so it works on the lcd, ...
0
votes
1answer
38 views

Copy tree directory from specific point

I am now sure how to word this, but: I am copying all the newest .zip files each recursive sub directory inside this original folder: "/Users/Stu/Documents/Hoffi Work/FTP Backup Shell ...
1
vote
1answer
49 views

How to copy a directory with only specified type of files?

I got a git directory with plenty of python files(and some special file like .git). I'd like to copy only these python files to another directory with the directory structure unchanged. How to do ...
0
votes
0answers
9 views

Verify par2 on different media?

Is there an easy way to point to a par2 index file in one place and have it use a different base directory for the files to verify? Here's what I'm up to: I copy a bunch of stuff to backup media. ...
15
votes
1answer
616 views

Transfer a file over a unstable SSH connection

I'm trying to upload some big files (around 10GB) with a slow upload speed (200kb/s) on a often disconnected SSH connection (due to poor network conditions). I'm trying to use scp, but if there is a ...
1
vote
3answers
62 views

copying files to other location

I have multiple directories named such as: 15mar20a_00021sq_v01_00019en.frames 15mar20a_00021sq_v01_00020en.frames and so on... each contains 7 files having an extension of .raw. Examples of the ...
0
votes
0answers
37 views

rsync question about a directory

I went ahead and used rsync to back up a root directory called /files my exact commands werersync -avzh /files willc66@server.com:/backup, inside my /files directory I had 2 sub directories home and ...
2
votes
4answers
345 views

What is the difference between (cp f1.txt f2.txt) & (less f1.txt > f2.txt) [duplicate]

I know that both will copy data from f1.txt to f2.txt, but what is the real difference? (cp f1.txt f2.txt) vs: (less f1.txt > f2.txt)
2
votes
1answer
59 views

cp -a fails to copy symlinks on virtfs

Problem: Trying to copy the entire content of one directory to another which includes hidden files/directories and symlinks. This is fairly straightforward cp -a ${src} ${dst} It works as expected ...
0
votes
0answers
26 views

gFTP - Received File Is (Allegedly) Larger Than Original!

I am using gFTP to transfer a large gzip file (the gFTP window says it is ~3.7GB). However an hour after saying it the transfer was 99% completed and had 00:00:00 time remaining and says the received ...
1
vote
1answer
73 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
1answer
20 views

file (vdi) increase (at double) size after split and then cat operation

I'd splitted a vdi file with 7 gigabytes and then joined with cat command. The file works normally on VBox, but get 14 gigabytes after be re-joined. The exact operation was: $ split -- bytes=2000M ...
2
votes
3answers
97 views

Copy files to a destination folder only if the files already exist. but the source files have a different file extension

Copy files to a destination folder only if the files already exist. but the source files have a different file extension. i.e I have a backup of some files with ".desktop.in" extension and I want to ...
2
votes
2answers
109 views

How to test which files will be copied with the cp command?

I'm creating a simple script that copies all files from DIRECTORYA that do not exist in DIRECTORYB. I'm doing this through the use of the cp command: cp -u DIRECTORYA/* DIRECTORYB What I'd like to ...
0
votes
1answer
61 views

ssh-copy-id different port

i am trying execute ssh-copy-id in one port different than 22 (default). I researched and found the command below $ssh-copy-id -i ~/.ssh/id_rsa.pub "user@192.168.0.1 -p 22001" but, when execute the ...
2
votes
2answers
46 views

How can I copy and move a sequential subset of files?

I have a directory containing 1772 files named PRC0001, PRC002,... up to PRC1772. How can I copy a subset, for example PRC0257 to PRC1516 to a different directory? I am trying to do this for several ...
1
vote
2answers
94 views

Copy files to multiple computers over LAN

Good day, I am pretty new to Unix and I need to do this simple task. I have a few files, let's name them file01, file02, file03 etc. and I need to copy each of them to one computer from a list. The ...
0
votes
1answer
108 views

How can I use a linux shell script to change directories and copy files?

There are several files I need to copy which are stored in different directories. The file names will all have two common fields that are distinctive for a particular date and time. I can usually ...
2
votes
1answer
59 views

Writing to exfat doesn't persist between mounts?

I... Bought a microSD card to store music on, for my Samsung Galaxy S4. Inserted it into the S4 and formatted the card (exFat). Installed fuse-exfat and exfat-utils and inserted the card into my ...
3
votes
1answer
127 views

Triple dot wildcards

I have a very large directory structure of source code that is very difficult to work with. I would like to run a tool to transform it to a Maven like structure that works better for me. When I have ...
2
votes
0answers
55 views

Prevent scp from overwriting existing files?

Have been googling this for a while, and the problem is not so much of one where I trust my users to "do the right thing" and have them use rsync with various options to avoid overwriting files. I ...
2
votes
2answers
41 views

How to copy a folder by another, but NOT by merging/adding

I am doing backups of a directory with a simple: cp -R /production/directory /backups/location Sometimes I need to restore a backup, but doing: cp -R /backups/location/* /production/directory or ...
-2
votes
2answers
87 views

Can I copy multiple directories into a single directory with a single command?

I have used photorec to recover data from a HDD and now have many directories /home/ray/recup_dir.1, to /home/ray/recup-dir.598 taking up valuable space in my Home directory. I want to copy them ...
2
votes
2answers
100 views

Find file, check size and overwrite when filesize is different

Today I found a little bug in my own written CMS. Now I want to rewrite all the files on the server with the same filename. However, I do have some customers with the specific file customized so I ...
2
votes
3answers
628 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 ...
2
votes
1answer
51 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
5answers
3k 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
26 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
327 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
74 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
15 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
595 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
59 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
2k 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.