Questions tagged [file-copy]

Questions regarding copying files from one place to another

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

scp with file ignore

Hi does anyone know how to ignore certain files when using the scp command? I have the following file structure on the server : Everything > NeedThis NeedThisTo DontNeedThis I want to get "...
user avatar
0 votes
1 answer
82 views

copying files from multiple specefic parent directories

I would like to copy files from the current directory which are divided into different subdirectories. The files I want to copy should only have True and False as their parents. True directory files ...
user avatar
1 vote
2 answers
57 views

Can I copy a snapshot of a file that's being constantly modified?

I have a file that's being constantly held open and continuously modified by another process. This process is continuously seeking to different parts of the file and writing new blocks. I'd like to be ...
user avatar
  • 113
0 votes
1 answer
25 views

copy folder skips some subfolders - Ubuntu 21.10

On Ubuntu 21.10 - I have been using "file manager" to copy a folder with several subfolders. Yesterday I found out that only two of sub-folders are actually copied... There is no indication /...
user avatar
  • 137
-4 votes
1 answer
69 views

how to get list of file names from remote server using connect direct secure plus protocol in unix [duplicate]

how to get list of file names from remote server using connect direct secure plus protocol in unix..I know that we can get files ..but I just want filenames
user avatar
  • 1
1 vote
0 answers
44 views

How merge two directories? [closed]

For example i have dirA, dirB - all with subdirectories. I want to merge dirA into dirB with "force" dirA. I tryied to use this /usr/bin/rsync -avh --progress dirA dirB But "force"...
user avatar
0 votes
3 answers
78 views

alternative to find for search and copy files?

I have many files called themes.txt (but different in content) scattered in various folders. I would like to use the locate command (not find !!!) to search for them and the cp -backup command to copy ...
user avatar
  • 1
0 votes
1 answer
61 views

How can i get permission to copy files from one folder to another?

So i was trying to copy some files from one folder to another using the cp command, but when tried it gave me this error: debian@OCR-1:/mnt/rootfs/boot$ ls MLO omap3-overo-storm-arbor43c....
user avatar
0 votes
0 answers
39 views

How to copy ALL files, from root, to an external hard drive in opensuse 15.2

Good day everyone. Since I'm going to format my laptop, I'm trying to copy all files, along with symlinks, hidden files and so on, starting from / I launched this command sudo rsync -avxHAXWS --...
user avatar
2 votes
2 answers
55 views

sorting files using string

I have a directory of 1000+ files (follow the same formatting) example file would be giroof-doas-ob10roof-L1-202007020832-10.std Where year is 2020 month is 07 day is 02 hour is 08 min is 32 ...
user avatar
0 votes
2 answers
37 views

Rsync filters (include / exclude)

I want to rSync some files / folders but i have problems with filters. This is what my source FS looks like: . |_ Invent/ | |+ Comps/ | |+ Prod/ | |_ Other/ |_ Archive/ | |_ Comps/ | |_ Prod/ | |...
user avatar
0 votes
2 answers
237 views

How can I copy all files while excluding files with a certain pattern?

I have the following folder and files: . ├── photos │ ├── photo-a │ │ ├── photo-a.meta.json │ │ └── photo-a.json │ ├── photo-b │ │ ├── photo-b.meta.json │ │ └── photo-b.json ... ...
user avatar
  • 103
1 vote
1 answer
54 views

understanding any network [i.e. infiniband] maximum file transfer speed

[Mellanox] infiniband HDR I have to work with is stated to be 100 gbps. In doing a single file copy of my30gb.tar with rsync --progress I observed a max of 480 MB/sec and an average of ~460 MB/sec on ...
user avatar
  • 4,211
0 votes
0 answers
16 views

How to copy all contents of a smaller drive onto a larger one?

Is there some way with the command line that I can copy everything on a 256GB drive with Ntfs onto a 1TB one also with Ntfs and everything else intact? I am thinking of a command relating to dd but I ...
user avatar
  • 135
0 votes
1 answer
23 views

Rsync unexprected behavior

I have 2 external drives and I want to use rsync to copy the files that have been updated (modified timestamp) in the source directory to a target directory. The files have the same filename but the ...
user avatar
  • 103
0 votes
1 answer
37 views

Damage Source File due to Cancelling Copy Paste

I was copying some 20gb of important documents to my usb drive from my mac. The process got stuck midway and I had to cancel the copy paste operation. Second time doing so the usb drive got ejected by ...
user avatar
1 vote
1 answer
86 views

How to let already copied files share fragments (reflink)?

I copy a file to a different XFS volume on daily basis as follows: # on monday cp --sparse=always /mnt/disk1/huge.file /mnt/disk2/monday/huge.file # on tuesday cp --sparse=always /mnt/disk1/huge.file /...
user avatar
  • 103
0 votes
1 answer
43 views

cancelled cp + du between ntfs drives caused data loss?

I am using Mac OSX and working with two external NTFS hard drives (HD1, HD2) using the Mounty tool to mount them in read+write mode. I needed to move two large folders from HD1 to HD2. I opened one ...
user avatar
  • 31
0 votes
2 answers
54 views

Copying files into multiple folders depending on name

I have folders nested various levels deep, with names such as x/y/z/Drawings and a/b/c/x/y/z/Plans. There might be hundreds of upper-level folders that contain a Drawings or Plans sub-folder somewhere ...
user avatar
0 votes
0 answers
268 views

File transfer via xRDP, Windows <=> Linux

Setup We currently have up and running the following setup: "Windows PC" | "Linux PC" ----------- | ---------- | RDP-Client ===|==> [xRDP] ==> [X11VNC] ==>...
user avatar
  • 103
1 vote
1 answer
39 views

Can't get contents of directory in home and can't copy file there

I'm trying to copy a command (istioctl) in my home directory on Debian so that I can always use it, as it will be added to my PATH variable automatically. I tried ("link1" is a symbolic link ...
user avatar
  • 15
0 votes
1 answer
48 views

How to replace content of nested files?

I need to find all project.updated files in some nested directory and use these files for content replacement of project.json file in the same directory. I'm using BusyBox (1.33.1). /apps /...
user avatar
  • 1,359
0 votes
1 answer
45 views

script to copy same file to a folder continuously in linux

I want a script to copy the same file from source folder to target folder by incrementing the filename (ex. file1, file2, file3, file4,....). This would be for some performance testing. I've got this ...
user avatar
0 votes
2 answers
66 views

One-way synchronize folders [duplicate]

Using Bash, I need to copy and override some files that have equal names but different contents from source, while ignoring equal files. I saw no option in cp's manual for copying only differing files....
user avatar
0 votes
0 answers
25 views

How to copy files to two TeamDrive directories

I have two Google Team Drives (TDs collectively, (TD1 and TD2) from now on). I want to backup files from my home server to the TDs for redundancy. I mounted the drives using rclone. I will use the ...
user avatar
0 votes
0 answers
117 views

Filesystem infinite loop

So I accidentially created an infinite loop by copying a parent folder into the current one and now it loops infinitely. Is it safe to delete the folder? Or how do I delete the looping directory ...
user avatar
0 votes
0 answers
27 views

Copy symbolic file source (origin) with Ctrl+C and nemo - Linux Mint

cp -L copy source of symbolic files, instead symbolic file itself, and for cp is standard parameter. I want to make this way for copy standard, for mouse copy in nemo (Linux Mint file manager) and ...
user avatar
0 votes
2 answers
82 views

Copying file between machines without uploading my private key

I have SSH access to two machines which I want to copy a big file between them. I also have sudo privileges, but I do not wish in any way to upload my private key file to one of the machines to login ...
user avatar
0 votes
0 answers
22 views

How to keep custom icons when copying folders with cp (in Mint, using Nemo)

I am using Linux Mint, with Cinnamon, and Nemo file browser. I have set custom icons for some sub-folders in my documents folders. I need to move/copy some of those folders, and I noticed that if I ...
user avatar
  • 249
1 vote
1 answer
391 views

rsync failed to set permissions for a local copy ("Function not implemented")

There are lots of similar questions out there, but none seems to address my problem: every time, the culprit is a legitimate permission issue, or an incompatible filesystem, none of which makes any ...
user avatar
  • 283
-1 votes
3 answers
105 views

How to keep latest file and previous latest file?

I run a script in which generates a text file. Lets call it file-a.txt. Then I run same script again and will overwrite the same file-a.txt but if course with new content. Thats ok. But now I want ...
user avatar
0 votes
1 answer
77 views

Full Bash script on creating txt file, directory, copy file, display info

Im still very new to codeing and Im still learning the basics and would love some help with explanation to learn what to do. Im stuck on this matter atm: Bash script to create a file with text inside ...
user avatar
0 votes
2 answers
40 views

Copy file into multiple folders, but only when starting with AST

I'm a first time poster & new-ish to coding: I need to copy a file ING_30.tif into 100s of folders, so I'm hoping to use a terminal command to do this quickly. Both ING_30.tif and the folders I ...
user avatar
0 votes
1 answer
27 views

Linux: How to copy files of a certain length to my home directory [closed]

I am trying to copy files of a certain length to my home directory. Is there a command that will do this?
user avatar
0 votes
0 answers
37 views

Copy one file every ten

I am pretty new to Linux and I got stuck on a very simple problem. Any help is greatly appreciated. I have folder with around 5000 images which are coupled because taken by two cameras at the same ...
user avatar
  • 1
0 votes
0 answers
15 views

batch copy multiples .txt with pathname on filename [duplicate]

I am trying to batch copy a lot of .txt files from various directories to Directory "all_txt" I am using fzf to find all text files. simple copy cp dir1/file1.txt dir1/file2.txt dir2/file3....
user avatar
  • 77
0 votes
0 answers
28 views

Files are corrupted when accessing files from host OS and the passive device on a virtual USB driver

I am doing an experimental project to make a virtual USB device to transfer photos from a camera to a Linux computer. In this case, I am using a Jetson-nano board and Ubuntu as the operating system. I ...
user avatar
0 votes
1 answer
100 views

rsync of a single file seemingly working but actually doing nothing?

I had a cp job of 5 GB fail on me because of file system full. After I resized the file system, I tried to resume a single file copy with rsync. $ rsync --progress /source/bigfile ./bigfile But it's ...
user avatar
1 vote
0 answers
111 views

Copying big file from external drive (NTFS) fails

I have a backup of a vdi file on an external 2TB hard disk with plenty of space. It's 25GB heavy. I was able to copy TO it obviously. Now I am trying to copy it back to a new laptop I got for work, ...
user avatar
0 votes
1 answer
160 views

rsync not working even when the destination file exists

I wish to get a file /export/home/remoteuser/stopforce.sh from remotehost7 to localhost /tmp directory. I fire the below command to establish that the file exists on the remote host: [localuser@...
user avatar
  • 307
13 votes
1 answer
1k views

What does !cp:$ do?

I saw this command in the documentation of one of the programs in my work: cp company-sso /usr/local/bin/company-sso ; sudo chmod +x !cp:$ I'm aware that : will stop the next command from being ...
user avatar
0 votes
3 answers
464 views

Can't move/copy/download files with ?, !, :, or | to exFAT flash drive

I've got a bunch of video files on my laptop's internal ext4 SSD (running Ubuntu 20.04, but this same error would presumably occur on any Linux install running kernel version 5.4 or newer, as exFAT ...
user avatar
  • 107
1 vote
1 answer
101 views

Effects of copy (cp) vs cut (mv) on file systems

When you have to move a file to a different location in the same file system, you have two options: just cut-paste (or mv), or copy-paste (cp) and then delete the old copy. I'm wondering what are the ...
user avatar
  • 111
-1 votes
1 answer
24 views

I need to move all files with a specific name from a directory tree into a single directory and give each file a different name

I have a directory with a large number of subdirectories. Within those subs are files named img_0004.bmp. I need to copy them all to a new directory and name them some new different name (e.g. ...
user avatar
0 votes
0 answers
28 views

Figure out changed directories in nested structure

I have a script that needs to parse a directory tree that is around 5 levels deep and sync it into an external service. To minimize the amount of work (there will be a lot of directories on each level)...
user avatar
  • 101
1 vote
1 answer
191 views

File permission change when copying to external hard drive

Why does a file with a permission of 0664/-rw-rw-r-- become 0777/-rwxrwxrwx when copied onto an external hard drive? The external drive is NTFS-formatted - does this matter?
user avatar
0 votes
1 answer
121 views

How to limit the number of files in a directory?

Is it even possible to limit the number (and not the size) of files in a specific directory? My directory only can contain up to five files, and cp file_6 mydir must not be allowed.
user avatar
  • 1
1 vote
1 answer
41 views

Duplicating a directory skeleton - Only folders and file names, but not file contents

I want to duplicate a folder and all the subfolders, but I do not want to duplicate the contents of the files in this directory. Let's say the folder I want to duplicate is Folder0 Folder00 ...
user avatar
  • 13
2 votes
1 answer
177 views

Match multiple pattern from a file and copy matching files in a dir to new dir

How to copy files from dir1 to dir2, matching pattern in a file1? for example: file1: T0_1 T0_2 T0_3 Dir1: T0_1_xxx_xx E1_1_xxx_xx T0_2_xxx_xx E1_2_xxx_xx E1_3_xxx_xx T0_2_xxx_xx I want to copy ...
user avatar
  • 21
1 vote
1 answer
80 views

How to merge 2 directories without overwriting *different* files with same relative path?

Example Suppose I have 2 directories a/ and b/. Let's say they contain the following files: a/ a/foo/1 a/bar/2 a/baz/3 b/ b/foo/1 b/bar/2 such that a/foo/1 and b/foo/1 are identical but a/bar/2 and ...
user avatar

1
2 3 4 5
13