Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do copy certain files and directories from one hard drive to another? Post 98816 by zazzybob on Saturday 11th of February 2006 07:34:27 AM
Old 02-11-2006
It still depends on your exact requirements. Say you have mounted the first slice of the old disk thusly:

mount /dev/dsk/c2t2d0s0 /mnt

And you want to copy everything off it to /foo

then...

cd /mnt
tar cf - ./ | ( cd /foo; tar xf - )

There are further options you can add to tar for preserving ownership and permissions, etc

Cheers
ZB
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

listing directories of an external hard drive

How do I do it? I have a mac and a pc and am having a time cd-ing to the external drive. (2 Replies)
Discussion started by: theGooch
2 Replies

2. UNIX for Dummies Questions & Answers

Trying to copy old hard drive to new hard drive.

:confused: ........I have a new hard drive and I need to copy ALL info from the old to the new. I would like to use the dd command. I know the command is as follows...... dd if=/dev/rdsk/c1t1d0s0 of=/dev/rdsk/???????? Where I have the question marks is the problem. How do I find out what the... (4 Replies)
Discussion started by: shorty
4 Replies

3. Filesystems, Disks and Memory

The best partitioning schem for a 250GB Sata hard drive & a 75GB SCSI hard drive

Hi I have 2 75GB SCSI hard drives and 2 250GB SATA hard drives which are using RAID Level 1 respectively. I wana have both FTP and Apache installed on them as services. I'm wondering what's the best partitioning schem? I wana use FC3 as my OS, so, I thought I can use the 75GB hard drive as the /... (0 Replies)
Discussion started by: sirbijan
0 Replies

4. UNIX for Dummies Questions & Answers

How to transfer files from UNIX to my own Hard drive storage?

I will leave the University I am working, but I need to backup and transfer my research data from UNIX system in our department to my own 750G Hard Drive Storage. But I am not familiar with UNIX. How to do this? Thank you. (5 Replies)
Discussion started by: fishwater00
5 Replies

5. Shell Programming and Scripting

help transferring tar files from cdrom to hard drive

alright guys, this is a pretty noob question but I need a script that will take a tarred folder "Animals" from cd and copy and extract it to replace an existing folder on hard drive called "Animals". (to give us more variations for another program which we don't need to worry about here), take the... (1 Reply)
Discussion started by: hootdocta5
1 Replies

6. Solaris

Hard Drive Copy results in differences on boot

I have an old Pentium 4 PC running Solaris 9. The system has two 40gig IDE hard drives. I removed the drives and, using a hard disk duplicating device, "cloned" both drives. I installed the new drives in the PC. The system boots but I get a message that X-Term will not run on the console. If I... (4 Replies)
Discussion started by: ddogarmyman
4 Replies

7. UNIX for Dummies Questions & Answers

Copy everything from remote Linux to external hard drive in windows

Hi, I`m trying to copy an entire directory(with numerous files, folders and subfolders etc, a content size of 500gigs) from a linux machine running Red Hat Enterprise Linux 6 to an external hard drive on my windows. I downloaded and installed psftp on my windows and I can login using psftp... (9 Replies)
Discussion started by: newbie83
9 Replies

8. UNIX for Dummies Questions & Answers

Copy files from one drive to another, keeping most recently modified files

Hi all, I am a bit of a beginner with shell scripting.. What I want to do is merge two drives, for example moving all data from X to Y. If a file in X doesn't exist in Y, it will be moved there. If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies

9. Shell Programming and Scripting

I want to copy all files of a said type on my external hard drive

My code is this, what I'm trying to accomplish is to make a list of all pdf documents in my computer and then copy all of those documents to my external hard drive in a directory mkdir /Volumes/Hardrive-1/allpdf echo "File Locations" > /Volumes/Hardrive-1/allpdf/FileLocations.txt mdfind pdf... (2 Replies)
Discussion started by: darpness
2 Replies

10. Solaris

How to make an exact image copy of a SCSI hard drive in Solaris 8 OS?

To Solaris 8 Experts, Please let me know what's the best method / procedure as well as the Solaris 8 commands for accomplishing the following tasks on a production Sun Enterprise 250 Server running Sun Solaris 8 Operating System: 1. Make an exact image/copy of the SCSI Hard Drive in the... (3 Replies)
Discussion started by: ssabet
3 Replies
scsi-spin(8)						      System Manager's Manual						      scsi-spin(8)

NAME
scsi-spin - spin up and down a SCSI device SYNOPSIS
scsi-spin [-options...] [device] DESCRIPTION
scsi-spin let the user to manually spin up and down a SCSI device. This command is particularly useful if you've got noisy (or hot) drives in a machine that you rarely need to access. This is not the same as the kernel patch that's floating around that will automatically spin down the drive after some time. scsi-spin is completely manual, and spinning down a drive that's in use, especially the one containing the scsi-spin binary, is probably a really bad idea. To avoid running in trouble with such cases, scsi-spin verifies that the device to work on is not currently in use by scanning the mounted file system description file for a partition living on it and issue an error if this the case. OPTIONS
-u, --up spin up device. -d, --down spin down device. -e, --loej load or eject medium from drive (use along with -u or -d ) -w, --wait=[n] wait up to n seconds for the spin up/down command to complete. Default is to return immediately after the command was sent to the device. Either repeat -w n times or set n to define the time to wait before to report a timeout. -l, --lock prevent removal of medium from device. -L, --unlock allow removal of medium from device. -I, --oldioctl use legacy ioctl interface instead of SG_IO to dialog with device (could not be supported on all platforms). -e and -w are not allowed with this option. -v, --verbose=[n] verbose mode. Either repeat -v or set n accordingly to increase verbosity. 1 is verbose, 2 is debug (dump SCSI commands and Sense buffer). -f, --force force spinning up/down the device even if it is in use. -n, --noact do nothing but check if the device is in use. -p, --proc use /proc/mounts instead of /etc/mtab to determine if the device is in use or not. device the device is any name in the filesystem which points to a SCSI block device (sd, scd) or generic SCSI device (sg). See section below. SCSI devices naming convention Old kernel naming convention It is typically /dev/sd[a-z] , /dev/scd[0-9]* or /dev/sg[0-9]*. scsidev naming convention It is typically /dev/scsi/s[rdg]h[0-9]*-e????c?i?l? or /dev/scsi/<aliasname>. devfs naming convention It is typically /dev/scsi/host[0-9]/bus[0-9]/target[0-9]/lun[0-9]/disc (same for cd and generic devices) or short name /dev/sd/c[0-9]b[0-9]t[0-9]u[0-9] when devfsd "new compatibility entries" naming scheme is enabled. SEE ALSO
scsiinfo(8), sg_start(8), sd(4), proc(5), AUTHORS
Eric Delaunay <delaunay@debian.org>, 2001 Rob Browning <rlb@cs.utexas.edu>, 1998 03 September 2001 scsi-spin(8)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy