Copy question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy question
# 1  
Old 01-16-2013
Copy question

I was reading man for cp, and I found the option cp -d.
What does it mean?
According to the documentation -d is the same as --no-dereference --preserve=link.
I understand that --preserve preserves the attributes of the file such as time stamp, but I have no clue about neither --preserve=link nor --no-dereference.
thanks
santiagorf

Last edited by Scott; 01-16-2013 at 02:37 AM.. Reason: Cross post. Closed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Basic question regarding root file system copy to another disk

Hello, I am creating a new disk using the following command: dd if=/dev/zero of=/export/home/ramdisk/0 bs=512 count=4096k after creating the disk, i tool a ufsdump of a solaris 10 filesytem (disk size 512MB) ufsdump -cvf /export/home/ufsdump/sol_orig /and then restored the dump files onto... (10 Replies)
Discussion started by: Zam_1234
10 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Copy question

I was reading man for cp, and I found the option cp -d. What does it mean? According to the documentation -d is the same as --no-dereference --preserve=link. I understand that --preserve preserves the attributes of the file such as time stamp, but I have no clue about neither --preserve=link... (2 Replies)
Discussion started by: santiagorf
2 Replies

3. Shell Programming and Scripting

Copy a column and paste to other file question

Please help me. This is simple, but urgent problem for me. :( I have a two files file1 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 ..... file2 11 12 13 14 15 11 12 13 14 15 11 12 13 14 15 ..... 1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Discussion started by: exsonic
2 Replies

4. Shell Programming and Scripting

KSH Script -- loop and data copy question

I am trying to write a script that will allow me to train others with commands that I run manually by only allowing the exact command before continuing onto the next set of commands. Here is where I come into an issue. I have changed the directories for this post. Software we run creates files... (2 Replies)
Discussion started by: hurtzdonut
2 Replies

5. Shell Programming and Scripting

(yet another) copy files from windows to server question

Hi all, I spent the last few hours Googling for a solution without result, so here goes: I have Windows server 'source' that produces files that need to be copied to an external Linux server 'target'. I initiate this process from AIX server 'jobrunner'. An additional step is a Linux server... (2 Replies)
Discussion started by: whbos
2 Replies

6. Shell Programming and Scripting

Copy and Delete Question

I have a script to tar up some older files. It did a find and mv, but I had to change it to preserve the directory structure because some of the directories now have duplicate nameed files. I changed it to a find and copy, then added a find and remove. Is there a better way so I don't have to... (2 Replies)
Discussion started by: prismtx
2 Replies

7. Shell Programming and Scripting

Simple question abt Copy command.

Hi ! All This is very simple question.... How to write a 'cp' command interative. Example : cp /wlsuite/om/cm/Tools/deploy_scripts/*.xml ${INF_ROOT}/tmp | echo "" || echo " Pls investigate ..." My intent was > to copy the files. > CP fails... then let know the user. pls... (2 Replies)
Discussion started by: dashok.83
2 Replies

8. UNIX for Dummies Questions & Answers

[Question]How to copy files to all subdirectory

I want to copy php.ini to all subdirectory. what command that should i run? (2 Replies)
Discussion started by: dzufauzan
2 Replies

9. UNIX for Dummies Questions & Answers

another question regarding copy

i cant do ftp to my unix server, basically i cant take my file out from unix server. now i want to copy the content of that file on windows based appl ..say..notepad.. the number of lines is apprx 10000... one way is to do cat filename | more then right clicking and pasting in the... (3 Replies)
Discussion started by: icecool1249
3 Replies

10. Shell Programming and Scripting

another copy to tape question

I have a file called feed_file. Every week, I would like to copy this file to tape. I would not like the file on this tape to be over written with the previous weeks file. So what I would prefer to do is to add time stamp at the end of each weeks file on the tape in order for the files to look... (1 Reply)
Discussion started by: ted
1 Replies
Login or Register to Ask a Question
CP(1)								   User Commands							     CP(1)

NAME
cp - copy files and directories SYNOPSIS
cp [OPTION]... [-T] SOURCE DEST cp [OPTION]... SOURCE... DIRECTORY cp [OPTION]... -t DIRECTORY SOURCE... DESCRIPTION
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY. Mandatory arguments to long options are mandatory for short options too. -a, --archive same as -dR --preserve=all --attributes-only don't copy the file data, just the attributes --backup[=CONTROL] make a backup of each existing destination file -b like --backup but does not accept an argument --copy-contents copy contents of special files when recursive -d same as --no-dereference --preserve=links -f, --force if an existing destination file cannot be opened, remove it and try again (redundant if the -n option is used) -i, --interactive prompt before overwrite (overrides a previous -n option) -H follow command-line symbolic links in SOURCE -l, --link hard link files instead of copying -L, --dereference always follow symbolic links in SOURCE -n, --no-clobber do not overwrite an existing file (overrides a previous -i option) -P, --no-dereference never follow symbolic links in SOURCE -p same as --preserve=mode,ownership,timestamps --preserve[=ATTR_LIST] preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: context, links, xattr, all --no-preserve=ATTR_LIST don't preserve the specified attributes --parents use full source file name under DIRECTORY -R, -r, --recursive copy directories recursively --reflink[=WHEN] control clone/CoW copies. See below --remove-destination remove each existing destination file before attempting to open it (contrast with --force) --sparse=WHEN control creation of sparse files. See below --strip-trailing-slashes remove any trailing slashes from each SOURCE argument -s, --symbolic-link make symbolic links instead of copying -S, --suffix=SUFFIX override the usual backup suffix -t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY -T, --no-target-directory treat DEST as a normal file -u, --update copy only when the SOURCE file is newer than the destination file or when the destination file is missing -v, --verbose explain what is being done -x, --one-file-system stay on this file system --help display this help and exit --version output version information and exit By default, sparse SOURCE files are detected by a crude heuristic and the corresponding DEST file is made sparse as well. That is the behavior selected by --sparse=auto. Specify --sparse=always to create a sparse DEST file whenever the SOURCE file contains a long enough sequence of zero bytes. Use --sparse=never to inhibit creation of sparse files. When --reflink[=always] is specified, perform a lightweight copy, where the data blocks are copied only when modified. If this is not pos- sible the copy fails, or if --reflink=auto is specified, fall back to a standard copy. The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values: none, off never make backups (even if --backup is given) numbered, t make numbered backups existing, nil numbered if numbered backups exist, simple otherwise simple, never always make simple backups As a special case, cp makes a backup of SOURCE when the force and backup options are given and SOURCE and DEST are the same name for an existing, regular file. AUTHOR
Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering. REPORTING BUGS
Report cp bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report cp translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for cp is maintained as a Texinfo manual. If the info and cp programs are properly installed at your site, the com- mand info coreutils 'cp invocation' should give you access to the complete manual. GNU coreutils 8.12.197-032bb September 2011 CP(1)