To copy a file or directory from a PCMCIA memory card to a hard disk or from a hard disk to a PCMCIA memory card, you must have already formatted the PCMCIA memory card (see "G.3.1 Formatting a PCMCIA Memory Card"). In addition, you must have write permission for the destination directory on the hard disk.
If you use the following procedure to copy a file or directory, you preserve the owner, permissions, group, and modification time of the file or directory.
If you use the tar command to copy files to a PCMCIA memory card, you must use the tar command to extract or copy files from the PCMCIA memory card.
Type:
% cd directory |
where directory is the name of the directory in which the files that you want to copy are located.
For example, to copy the file /home/samples/design, type:
% cd /home/samples |
Type:
% tar cvf device_name filename |
Table G-4 tar Command Options to Copy Files to a PCMCIA Memory Card
Option |
Description |
---|---|
creates a backup archive |
|
displays a verbose listing |
|
specifies an input device name |
For example, to copy the file ./design located
on your hard disk to a PCMCIA memory card that has the device name /dev/rdsk/c1t6d0s2
, type:
% tar cvf /dev/rdsk/c1t6d0s2 ./design |
Type:
% cd directory |
where directory is the name of the directory in which the files that you want to copy are located. In this case, the directory is located on the PCMCIA memory card.
For example, to copy the file /home/samples/design, type:
% cd /home/samples |
Type:
% tar xvfp device_name filename |
Table G-5 tar Command Options to Copy Files from a PCMCIA Memory Card
Option |
Description |
---|---|
extracts a backup archive |
|
displays a verbose listing |
|
specifies an input device name |
|
preserves the original modes of the file |
If a file or directory with the same name as the one being copied already exists in the working directory, it is automatically overwritten.
For example, to copy the file ./design from a PCMCIA
memory card with an address /dev/rdsk/c1t6d0s2
to the working directory on your hard disk, type:
% tar xvfp /dev/rdsk/c1t6d0s2 ./design |