The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
54 views

Recursive copy files with rename

If I have input folder files_input that has subfilders like 01-2015, 02-2015, 03-2015 etc and all these subfolders have other subfolders. Each subfolder has only one file called index.html. How can ...
2
votes
3answers
129 views

How to I copy the directory and subfolders but ignore certain files in the subfolder?

I believe the question is best asked with an example. /home test1.txt test2.txt /home/my-folder test3.txt test4.txt test1.txt, test2.txt and my-folder folder are inside /home. ...
3
votes
2answers
214 views

Copy contents of file without displaying the contents

How to copy the contents of a file in UNIX without displaying the file contents. I don't want to cat or vi to see the contents. I want to copy them to clipboard so that I can paste it back on my ...
-5
votes
1answer
42 views

Copying and relative Home

Your current directory is oxford. Make a copy of the file named outline.doc and place it into the sample_dir directory, using relative pathnames. I've attempted everything. sample_dir1 `-- ...
1
vote
0answers
35 views

Is it possible to change file permissions when copying

I have a directory with default ACL permissions that get copied to all files created in that directory, but only if they are created in that directory. Would it be possible to change the permissions ...
0
votes
0answers
21 views

After rsync no files exist

From my Ubuntu server I used rsync to copy all my data to my USB drive (FAT). After copying the data (it needed quite a while to copy so I guess the copying did happen) I deleted it from the server. ...
0
votes
2answers
26 views

Content cached in RAM while writing to disk - Linux

I'm facing this issue since ever I started using Linux Distros. While copying/moving either graphically or with cp one/many big content(anything like big text file, tar.gz archive, iso file, movies) ...
0
votes
3answers
49 views

download file from internet to server using SSH

recently because of some problem i lost all my server file and request to hosting team to provide me backup. they will provide me link from where i have to download that compressed file and upload ...
0
votes
1answer
18 views

Copying file from DVD fails

I am running Arch linux on my MacBook (Late 2009 unibody, if it matters). Using the following command, I attempted to copy an ISO that is stored on the disk onto my computer pv /mnt/file.iso > ...
1
vote
2answers
43 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 ...
0
votes
2answers
45 views

how to copy file from my local pc into my android phone?

I want to copy a file from my local pc into my android phone.The android phone was be read as gphoto2://[usb:001,009]/ mv test.mp4 gphoto2://[usb:001,009]/ mv: cannot move `test.mp4' to ...
2
votes
2answers
72 views

Copying latest file from remote server

There is a collection of .doc files, in addition to other types of files, on a remote server (which supports SCP). I am trying to write a script to retrieve the latest (most recently modified) .doc ...
3
votes
3answers
69 views

Copying a Parent Directory into a Subdirectory Without an Infinite Loop

For application specific reasons, I need to copy an entire parent directory into a subdirectory. E.g., cp -r ../ tmp/ The problem with this is that it gets stuck in an infinite loop, recursively ...
10
votes
2answers
373 views

How can I partially copy a file from a broken disk?

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. How ...
1
vote
2answers
67 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: ...
4
votes
3answers
138 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
305 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: ...
7
votes
2answers
211 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
121 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
43 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
77 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
44 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
91 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
51 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
54 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
108 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
78 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
47 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
55 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
64 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
52 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
18 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
671 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
68 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
38 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
379 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
78 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
31 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
103 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
29 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
155 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
155 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
90 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
66 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
131 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
140 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
69 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
169 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
65 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
42 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 ...