Sponsored Content
Top Forums UNIX for Dummies Questions & Answers which cmde recommended to copy an entire dty? Post 56806 by zazzybob on Tuesday 12th of October 2004 10:52:11 AM
Old 10-12-2004
cpio will preserve the symbolic links (and pretty much everything else you'd want).

In it's simplest form

find /some/input/dir -print | cpio -ov | gzip > output.cpio.gz

Will create a gzipped cpio archive of /some/input/dir and it's subdirectories and links, without archiving whatever the link points to.

You can skip the last pipe if you don't want the archive gzipped.

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. Solaris

cp a dty without symbolic links?

Hi, - we have copy (cp command) to do to save all the contents of a dty BUT we dont want to copy the files corresponding to symbolic links contained whithin this dty - the box is a sun solaris one - and the cp commande do not say avything about that? thanks for help Jakez (7 Replies)
Discussion started by: JAKEZ
7 Replies

2. Linux

Copy entire disk in FC3

I'm running FC3 and I'd like to copy the entire /dev/hda to /dev/hdc, including all the boot info, so that I can boot off of it in case of failure. This will be a one time thing. I'm doing an app upgrade and I'm very afraid the install will go wrong, so I want to be able to quickly be back up in... (11 Replies)
Discussion started by: dangral
11 Replies

3. UNIX for Dummies Questions & Answers

Copy and entire folder except one

Hi, I have a folder named "A". I want to copy the entire stuff inside it to another location except the folder "B" which is present inside it. How can it be done? (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

4. UNIX for Dummies Questions & Answers

Search for a string and copy the entire line

Hello All, I am after the script or the command which can scan the entire file for a string $PART_ID and when found to extract/copy the corresponding $PART_ID value (e.g THIRE_PTY_SOFTWARE for the 1st occurance of $PART_ID in the attached file) to a file. Appreciate your help. Thanks in... (3 Replies)
Discussion started by: forumthreads
3 Replies

5. SCO

Make a Copy Entire Hard Disk

Dear All, I have a standalone desktop with SCO Openserver V 5, this is used to control a machine with custom written software. The problem is that the machine manufacturer has closed shop (bankruptcy) and there is no support on software. As a precaution I would want to make a complete backup of... (3 Replies)
Discussion started by: iqbal_siddiqui
3 Replies

6. UNIX for Dummies Questions & Answers

How to copy entire file content into another file being in last line mode of vi ?

How to copy entire file content into another file being in last line mode of vi ? ---------- Post updated at 10:07 AM ---------- Previous update was at 09:56 AM ---------- Got it : :1,30w file.txt (1 Reply)
Discussion started by: presul
1 Replies

7. UNIX for Dummies Questions & Answers

Copy entire contents of file to clipboard

Hi, I am trying to figure out how to copy the contents of a file to the clipboard, then paste into a command. i.e copy contents of file /path/filename.txt to <command> <paste text> Hope that makes sense. Basically tryting to copy the text for use in a command without having to open the... (8 Replies)
Discussion started by: JCA70
8 Replies

8. Shell Programming and Scripting

Copy an entire file to specific position to another file

Hi , I need your kind help for my below requirement I need to copy and entire txt file to a certain position to the target file . Source file has 3 lines and it has to be copied to the target file in position from line 10 to 12. Thanks for your support (1 Reply)
Discussion started by: Pratik4891
1 Replies

9. OS X (Apple)

Copy entire line in bash (terminal) - keyboard shortcut

how can I do that? I can paste a line with ctrl+p; but I dont know how to copy it? ctrl+y - just deletes etc. (2 Replies)
Discussion started by: c_lady
2 Replies

10. Shell Programming and Scripting

Copy entire file to a new file in awk

Hi, How do we write the contents of multiple files created in awk body to a new file in awk (END block) ? when I used "getline", it is consuming more time. Do we have any other way other than getline? (1 Reply)
Discussion started by: Cool
1 Replies
CPIO(1) 						      General Commands Manual							   CPIO(1)

NAME
cpio - copy files to and from archives SYNOPSIS
cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message] [--null] [--reset-access-time] [--verbose] [--dot] [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet] [--force-local] [--rsh-command=command] [--help] [--version] < name-list [> archive] cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format] [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--make-directories] [--nonmatching] [--preserve-modification-time] [--numeric-uid- gid] [--rename] [-t|--list] [--swap-bytes] [--swap] [--dot] [--unconditional] [--verbose] [--block-size=blocks] [--swap-halfwords] [--io- size=bytes] [--pattern-file=file] [--format=format] [--owner=[user][:.][group]] [--no-preserve-owner] [--message=message] [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc] [--to-stdout] [--quiet] [--rsh-command=command] [--help] [--version] [pattern...] [< archive] cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]] [--null] [--reset-access-time] [--make-directories] [--link] [--quiet] [--pre- serve-modification-time] [--unconditional] [--verbose] [--dot] [--dereference] [--owner=[user][:.][group]] [--no-preserve-owner] [--sparse] [--help] [--version] destination-directory < name-list REPORTING BUGS
Report cpio bugs to bug-cpio@gnu.org GNU cpio home page: <http://www.gnu.org/software/cpio/> General help using GNU software: <http://www.gnu.org/gethelp/> Report cpio translation bugs to <http://translationproject.org/team/> SEE ALSO
cpio(5) DESCRIPTION
GNU cpio is fully documented in the texinfo documentation. To access the help from your command line, type info cpio The online copy of the documentation is available at the following address: http://www.gnu.org/software/cpio/manual CPIO(1)
All times are GMT -4. The time now is 04:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy