The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
0answers
57 views

How do I recursively set the date created attribute to the date modified attribute on NTFS-3G?

In my first question, I asked how to get the "Date created" field in NTFS-3G. Now, that I know I can get the "Date created", I have started adding files onto my NTFS-3G partition and would like to set ...
2
votes
3answers
1k views

Copy files from a list to a folder

I have a text file abc.txt and its contents are: /lag/cnn/org/one.txt /lag/cnn/org/two.txt /lag/cnn/org/three.txt If I use: $ tar -cvf allfiles.tar -T abc.txt I'm getting the tar of ...
2
votes
4answers
142 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 ...
2
votes
1answer
3k views

Copy multiple files into one (append, merge) in single invocation without shell redirection?

I'm looking for some sort of a command that I can use, to copy/append multiple files into one; but without shell redirection (I'd like to try it in call_usermodehelper, see similar issue in ...
2
votes
2answers
892 views

How to make duplicates with different names from a single file? [closed]

I want to duplicate the contents of a file. Suppose there is a file named "Hydrogen.element". I want to duplicate the contents of this file with a different name ie.make another file named ...
2
votes
2answers
9k views

How can I get the address of my local machine?

I'm on a macbook running Lion. In Terminal I'm connected to my schools server with ssh. I navigated to a folder on the server and have a file I want to copy to my local machine, but I don't know what ...
2
votes
3answers
222 views

How to copy a list of files and adjust destination filenames on the fly?

When I don't need to adjust destination filenames I can do something like this: $ find -type f -name '*.pat' -print0 | xargs -O cp -t /path/to/dest It is safe because the filenames may even ...
2
votes
3answers
88 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 ...
2
votes
5answers
74 views

How to copy 5 newest files from one directory to another and delete the old copies

How can I copy the 5 newest files from a directory to another in a "new to old" order.
2
votes
1answer
2k views

Can i transfer files using ssh?

I am using PuTTY on Windows 7 to ssh to my school computer lab. Can I transfer files from my windows machine to my user on the school machines using ssh?
2
votes
1answer
1k views

Finding corrupted files

I have a directory that have zillions of files. As soon as I try to copy this directory, I receive a message that a file could not be copied (corrupt ?) and the copy stops. Is there any command I ...
2
votes
2answers
599 views

Upload file over ssh and execute command on the remote machine

I am trying to find the simplest way to upload a file using ssh and after that run a command on the remote machine within the same ssh session for some post-processing, so that I don't need to login ...
2
votes
1answer
3k views

rsync all directories that start with a specific digit

I have directory loaded with thousands of sub directories: /home/tmp/ 1 12 123 1234 2345 234 3456 345 34 ...
2
votes
6answers
297 views

Copy/Move whole folder but with certain extentions

I have a backup copy of my site located in /tmp/backup and want to copy it to /home/mysite/public_html But my aim is to copy only the .php files (with nested folders) and replace. If I don't have ...
2
votes
1answer
26 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
237 views

Copy files based on date/time from subset of directories

I'm teaching a class where (~80) students are submitting assignments that I can access via webdav, organized by student in directories named by their unique identifier. The students are split into ...
2
votes
2answers
63 views

How to copy a very large video file with error in it?

I have a very large video file on a USB external HDD. It is about 13GB. I can play the video directly, and it seems there's no problem. But if I try to copy the file to other places, I got a strange ...
2
votes
2answers
450 views

How to copy multiple files but keep their extensions the same?

I am looping through a number of files, and $file represents the current file. How can I make copies or renames and keep the extension the same for this current file? e.g. if $file = x.jpg How to ...
2
votes
2answers
695 views

How to download the latest file in a folder using a scp?

I'd like to run an scp transfer to download the latest (newest) file in a certain directory to my local directory. Something like this: source: root@rimmer.sk:/home/rimmer/backups/ destination: ...
2
votes
2answers
89 views

Replicate a directory and file names n times

I have folder which has some data (files) in that with the name 201311261418 And a file 201311261418.eob In my scenario I need to replicate this folder and file names n times with the appended ...
2
votes
3answers
3k views

read only access to all files in a specific sub-folder

I have got a specific folder located in "/home/.../reboot/". I have a series of users that require read-only access to the ever changing files within. My problem is that the same users are not ...
2
votes
1answer
206 views

Find Directory and copy another directory to found directory?

I'm attempting to find a directory A that could be in a variable location and copy another directory B into the found directory. So, I'd like to find directory A, and copy Directory B into Directory ...
2
votes
2answers
574 views

How to copy a partition over network

I want to copy a Windows 7 partition that came installed on my laptop to my desktop computer. I've tried: # bzip2 -c /dev/sda5 | nc 192.168.1.1 2222 # on laptop # nc -l 2222 | bzip2 -d > ...
2
votes
2answers
228 views

Interesting Secure Copy Behavior

I'm not entirely sure where to ask this question, so if this is not the right place just let me know and I'll move it. Today I was trying to using recursive scp to copy a directory between two Linux ...
2
votes
1answer
50 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/ ...
2
votes
1answer
106 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 ...
2
votes
1answer
120 views

How to copy files *to* a camera?

I'd like to copy a firmware update file to my Canon 7D camera. After it was auto-mounted by thunar + thunar-volman + gvfs-gphoto2 I tried the following: $ cp eos7d-v205-win/7D000205.FIR ...
2
votes
2answers
152 views

RPM skipping files on install

I am installing an rpm package and it appears to be skipping certain files without giving me any notice as to what the issue is. When I execute rpm -ivh package_name.rpm the rpm provides me with ...
1
vote
2answers
6k views

faster alternative to cp -a

For a simple transfer of /home to another disk i use cp -a that seems to me an extremely slow way. Should like know a more efficient way to complete the task. I have /home mounted as logical volume, ...
1
vote
5answers
597 views

How do I disable copy permissions?

Can we set permissions, on a Linux box OR for a particular directory (Scientific Linux in my case) that, one can read files but cannot copy, move or delete them? Update: My Scenario is, We developed ...
1
vote
3answers
51 views

How to copy the home directory in the home directory?

I need to make a copy of my home directory and place that copy in the same home directory. The exit code of the command must be 0. Currently, my home directory does not contain any other directories. ...
1
vote
1answer
72 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
295 views

Copying files based on a condition

Here's the problem I'm attempting to solve: Let's say I have a directory "A", containing some files as well as some other directories. I want to copy all the files directly under directory A to ...
1
vote
3answers
107 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
493 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 ...
1
vote
1answer
106 views

How to copy files within a remote server?

I would like to copy files in an remote server from one directory (in the remote server) to another (also in the same remote server). I tried this: scp -r myacc@remote.server:/folder_a/*myfiles* ...
1
vote
3answers
99 views

How do I iterate the list and copy the files from machineB and machineC efficiently?

I need to scp the files from machineB and machineC to machineA. I am running my below shell script from machineA. I have setup the ssh keys properly. If the files are not there in machineB, then it ...
1
vote
1answer
193 views

Copying to an external NTFS partition: slows down when I copy many files at once

I have made my peace with the fact that NTFS(-3g) on Linux will be slower than NTFS performance on Windows. I can write to my external NTFS-formatted USB 3.0 HDD at about 100+ MB/s on Windows while I ...
1
vote
2answers
48 views

Translating user id when creating image

I want to create an image (for example ext3 image) from a given directory hierarchy. This directory hierarchy is owned by a given user. But on the final image, I want the files to be owned by ...
1
vote
1answer
736 views

Need small and light stand-alone one-file ftpd server

Can somebody suggest a small one-.c-file ftpd server, so I can run it on any port and it would accept ftp upload with any l/p on that port and put a file into a folder where it runs? No config files ...
1
vote
1answer
108 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 ...
1
vote
3answers
199 views

Adding timestamp to file/dir name

I am trying to write a script, that will copy file or directory with added timestamp to filename/dirname Something like: cover.jpg --> cover_18-01-2014_17:37:32.jpg directory --> ...
1
vote
2answers
98 views

Copying and renaming files to a single directory by a single shell script

I have multiple files with an example of how they look like shown below. -rw-r--r-- 1 my_user users 12 Dec 13 09:56 Example_30_001_20130913175000.DAT -rw-r--r-- 1 my_user ...
1
vote
1answer
32 views

How to ignore files if there is an similar file with the same size?

I want to list the files in a directory, using ls. Typically, the files in that directory have the same name (except for the extension - one has extension .rej, one has .failed) . If a pair of files ...
1
vote
1answer
195 views

“Out of Memory” error while copying large files with pcmanfm

This is an older machine running a Debian-based distro with lxde and pcmanfm used as file manager. pcmanfm normally runs quite well, except when it comes to copying very large files (e. g. *.VOBs from ...
1
vote
1answer
145 views

Copy file from cifs mount when a file is changed

I have a windows XP machine, and on this i'm running a weather station. The software updates several files in a folder. This folder is mounted via samba on the webserver(debian) I wan't to monitor ...
1
vote
1answer
472 views

How to clone a read-only portion of /proc file system

The problem with reading /proc file system is that it is not atomic. I tried using a library (procfs in Python) that wishes to read it, but it has glitches about 5% of the time because the process ...
1
vote
1answer
217 views

Copying a directory to multiple users home dir and changing user/group ownership

On my Ubuntu server there are about 150 shell accounts. All usernames begin with the prefix u12.. I have root access and I am trying to copy a directory named "somefiles" to all the home directories. ...
1
vote
1answer
940 views

Insert selected filename while copying in Midnight Commander

Is it possible to paste the selected filename into the copy popup, so when I hit F5 this filename will be in the 'to' section, so I can adjust it? For example: I want to copy ...
1
vote
1answer
322 views

Bash command that uses wildcard in place of folder to copy folder contents of multiple files into one directory?

I have a directory ~/dir that contains a bunch of random folders like: ~/dir/av 801 and ~/dir/lm 320. I want to copy the contents of every inner folder (ie: av 801) into a different directory. The ...