Sponsored Content
Full Discussion: [Solved] Copy question
Top Forums UNIX for Dummies Questions & Answers [Solved] Copy question Post 302756413 by santiagorf on Tuesday 15th of January 2013 11:47:31 PM
Old 01-16-2013
[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 nor --no-dereference.
thanks
santiagorf
 

10 More Discussions You Might Find Interesting

1. 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

2. Programming

lvalue question [solved]

Hi, This code was originally to print a sine function table. I modified it to print a tangent function table. I got an "lvalue" error which I can't solve...Any hint on why am I getting this error? Here is the code: // sintab.cpp // Creates a tangent function table #include <iostream>... (2 Replies)
Discussion started by: faizlo
2 Replies

3. UNIX for Dummies Questions & Answers

Basic Question on perl use POSIX [SOLVED]

Hi guys, I think this is a basic question. I'm not very familiar with this. I'm trying to round a number up and round a number down. From what I have read this can be done using POSIX. I have tried to to use this, but i'm getting errors: sub findGridBounds($$$%) { use POSIX; ... (0 Replies)
Discussion started by: WongSifu
0 Replies

4. Shell Programming and Scripting

[Solved] copy + rename

Hi, I was thinking that this should be a synch but I could never get it to work. I want to copy a bunch of files within a directory (3/4 levels into the directory) to a common place. All these files have the same name, so I prefer to rename them with the path. I tried with files=`ls -1... (5 Replies)
Discussion started by: jamie_123
5 Replies

5. Shell Programming and Scripting

[solved] Question for using variables outside a while loop

I want to get newvar outside the while any ideas? while read myline; do var=${myline} newvar1=$(let "$var") done echo $newvar1 I found it its ok now Thank you! (0 Replies)
Discussion started by: sanantonio7777
0 Replies

6. Shell Programming and Scripting

[Solved] Question for Perderabo on date calc

Hi, First of all, thanks for all the awesome suggestions on this forum. This helps all the UNIX enthusiast like me. Now, I had a similar requirement as mentioned in a very old post here: Question about Perderabo's "Days Elapsed Between Two Dates" But I am struggling what to change in the... (5 Replies)
Discussion started by: CleoBos
5 Replies

7. UNIX for Dummies Questions & Answers

[SOLVED] Copy subfolder to another directory preserving parent name

Hi, I have the following folder structure: Folder6100/Data Folder6100/Data Folder6120/Data Folder6120/Data Folder6140/Data Folder6140/Data Folder6160/Data Folder6160/Data Folder6180/Data Folder6180/Data Folder6200/Data Folder6220/Data Folder6240/Data Folder6260/Data... (2 Replies)
Discussion started by: alex2005
2 Replies

8. Shell Programming and Scripting

[Solved] Copy Problem

I facing a problem : I have a Source and Destination directory. The Source directory is linked to SVN and is updated by the Script to Head Revision. After that i copy the Source to Destination by this command: cp -r /SOURCE PATH /DESTIUNATION PATH Now if a delete a file in source and... (5 Replies)
Discussion started by: ankur328
5 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Need help to copy files to another server

Hi all, I need a shell script to compress and transfer only last modified(new) file from one linux server to another linux sever. the files i need to backup are 2 files .txt & .log which will be created in the same folder for every 3-4hrs and this script need to run once in 24hrs. so only... (5 Replies)
Discussion started by: basszzz
5 Replies

10. Solaris

[Solved] Question changing timezone rules / zic

Dear, One of our customer which is located in Iraq/Baghdad, has informed us about a official change in daylight saving time in few days later and has asked us to fix this issue. So, the current timezone of that system is set as 'Asia/Baghdad' which is correct. however to fix the issue I went... (0 Replies)
Discussion started by: Anti_Evil
0 Replies
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)
All times are GMT -4. The time now is 03:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy