The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
2answers
2k views

SELinux: Can I disable copying of certain files?

Please excuse me if this is too basic and you're tempted to throw an RTFM at me. I want to prevent users from copying certain files while granting them read access to the same files. I thought this ...
1
vote
5answers
908 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
2answers
9k 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, ...
2
votes
1answer
333 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
3answers
307 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 ...
-1
votes
2answers
76 views

Using .. and . to copy files from dirctories

I'm trying to copy a file from the home directory to the current directory( which is a subdirectory of a directory in home) using .. and . instead of path names or ~ This is what I tried, but it ...
3
votes
1answer
4k 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 ...
0
votes
3answers
4k views

how to copy files from windows to linux witout password using a script or program?

I did this to copy files between Windows and Linux. C:\Documents and Settings\668340\My Documents\putty>pscp "C:\Documents and Settings\563456\abc.txt" "auto_root@10.39.5.41:/home/auto/" But it ...
1
vote
3answers
9k views

Copy file from Windows shared folder to Unix

I am totally new to Unix. I am writting a script which will copy files from a Windows shared folder to Unix. In Windows, when I type \\Servername.com\testfolder in Run command I am able to see ...
2
votes
2answers
699 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 > ...
3
votes
3answers
535 views

How can I automate the process of copying files from one folder to another in Centos

I have a statistical application which runs every minute and creates charts accordingly. In order to make these charts available to other users, I need to copy the whole folder containing the charts ...
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
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 ...
3
votes
2answers
134 views

Advanced file filtering

I have 3 distinct folders: history, inbox, backup. I need to copy all the files from 'history' to 'inbox', only if they are not present in 'backup'. How to do this?
2
votes
2answers
171 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
1answer
280 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. ...
0
votes
1answer
100 views

Creating the first backup

I heard that rsync isn't the best one when creating the first backup in terms of performance. Instead it is the best for the later backups. So I wonder what are some better commands for creating the ...
6
votes
2answers
10k views

Fast way to copy a large file on a LAN

I am having some trouble with NFS, and I'd like to try using just plain old TCP. I have no idea where to begin, though. Hardware-wise, I am using an ethernet crossover cable to network two netbooks. ...
1
vote
1answer
102 views

Will files created under source directory after running `cp` be copied?

Suppose I use cp to copy a directory to another place. If the process takes long, and I create a new file under the source directory, will it be copied, or does it depend on something?
1
vote
1answer
2k views

Copying files between users Using Telnet

How to copy a file from home directory User A to home directory of User B using telnet.
2
votes
2answers
1k 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
241 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 ...
4
votes
4answers
4k views

How to clone/copy all file/directory attributes onto different file/directory?

I want to copy the attributes (ownership, group, ACL, extended attributes, etc.) of one directory to another but not the directory contents itself. This does not work: cp -v --attributes-only A B ...
5
votes
3answers
2k views

Resume interrupted copying process

How to resume securely and reliably process of copying file $A into backup location $B done with pv "$A" > "$B" or cat "$A" > "$B" ? (let's assume file $A is very big, e.g. LVM2 snapshot file) ...
12
votes
5answers
3k views

How can I copy a file and create the target directories at the same time?

I want to cp aaa/deep/sea/blob.psd to bbb/deep/sea/blob.psd How do I do the copy if the deep and sea directories don't exist under bbb so that the copy both creates the directories that are needed ...
10
votes
1answer
3k views

Best way to continue stopped move (mv) by merging directories?

I have moved (mv) a pretty large directory on my NAS (Linux based), but had to interrupt the procedure. Not being a regular Linux user, I though I could just continue and merge the rest later in. mv ...
1
vote
1answer
4k views

Is there a command line utility that copy files with progress information? [duplicate]

Possible Duplicate: move files with progress bar cp gets the job done but it would be nice if it had a little more feedback. Are there any utilities out there that do this? Personally, my ...
3
votes
2answers
7k views

Automate file transfer from Windows to Unix

I have the following situation: users update csv/txt files on daily basis on Windows. I use those flat files as input for my Oracle scripts which is on Unix. I need help on script/method of ...
2
votes
2answers
776 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 ...
6
votes
2answers
5k views

How to copy only matching files, preserving subdirectories

Is there a way to do this: "How can I copy a subset of files from a directory while preserving the folder structure?", but without using rsync? Is it possible to be done using only cp, find and grep? ...
1
vote
2answers
358 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
1answer
1k 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
2answers
49 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 ...
7
votes
2answers
3k views

How can you move (or copy) all files to a directory with the same filename prefix?

Using Bash So let's say I have a bunch of files randomly placed in a parent directory ~/src, I want to grab all the files matching a certain suffix and move (or copy) them to a ~/dist directory. ...
14
votes
3answers
10k views

Copy and paste a file/directory from command line

Instead of using the following command: cp {source file} {dest file} I want to be able to copy a file into the clipboard, and paste it somewhere else, in another directory. something like this: ...
8
votes
3answers
13k views

How can you move (or copy) all files of a certain type to a directory in Unix?

I'm not very familiar with all the tricks of grep/find/awk/xargs quite yet. I have some files matching a particular pattern, say *.xxx. These files are in random places throughout a certain ...
5
votes
3answers
419 views

Copying large tree from one machine to another, maintaining ownership

I am trying to copy a large folder structure between machines. I want to maintain the ownership/rights during the copy as it is not reasonable to 'fix' the privs afterwards. Therefore, I am using the ...
3
votes
2answers
1k views

How to add/replace only modified/updated files recursively for some 2 folders?

So I currently do stuff like: rm -rf ../../../$CLOUD_INSTALL_SUBDIR/lib_boost mkdir ../../../$CLOUD_INSTALL_SUBDIR/lib_boost cp -r ../../../$BOOST_ROOT_DIR/$BOOST_INSTALL_SUBDIR/lib/* ...
5
votes
1answer
4k views

bash force copy over same file

Our sysadmin has created a backup system that creates snapshots of the hard drive. When I try to restore an older version from the snapshot: cp /path/to/snapshots/foo.bar /path/to/folder/foo.bar ...
3
votes
3answers
12k 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 ...
6
votes
2answers
3k views

How do I save changed files?

I have two folders: ORIGINAL/ ORIGINAL_AND_MY_CHANGES/ My friend has a copy of ORIGINAL/. I would like to generate MY_CHANGES.tgz -- it should contain only new/changed files from ...
1
vote
0answers
271 views

How to configure character encoding in OpenFT?

When transferring files over: http://ts.fujitsu.com/products/software/openseas/openft.html then the charset of files get's scrumbled...I can't seem to find any character encoding settings, how to ...
4
votes
2answers
9k views

“Permission denied, try again” while transferring files with scp

I have two servers (A and B) and my local machine. I'm trying to transfer a file from server A to server B. From server A: scp ./backup.tar user@server.b:/home/public/ Permission denied, please try ...
2
votes
1answer
882 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 ...
3
votes
2answers
10k views

Permissions “problem” using SCP to copy to root owned folder from local

I'm taking some early forays into setting up a basic LAMP box. It's my first time setting up the software I'll use as opposed to just being handed a working environment, so go easy on me :) I have ...
4
votes
3answers
14k views

Copy files with renaming

I have a huge file tree. Some files have same name but in different case, e.g. 'some_code.c' and 'Some_Code.c'. So when I'm trying to copy it to NTFS/FAT filesystem it asks me about whether i'm ...
4
votes
3answers
3k views

How do I only copy files to a remote folder on another server that don't already exist in the folder… from the command line in linux?

I have two folders on two different servers. I want to sync files between A and B, however, I only want to copy files that don't already exist in folder B because these files are huge. I don't care ...
4
votes
3answers
396 views

mkdir based on input from other directories

I have a directory full of albums I've ripped to FLAC format. Folders are named "Artist - Album [flac]" I need to create matching directories named "Artist - Album [mp3]" but only for certain ...
2
votes
6answers
347 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 ...
1
vote
1answer
350 views

File manager with spring-loaded folders?

One thing I miss about Finder, Mac OS X's file manager, is the spring-loaded folder function where if you drag a file(s) over another folder long enough, the folder would open and you can "navigate" ...