Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

tar linux command

linux



+ Font mai mare | - Font mai mic



tar

tar [options] [tarfile] [other-files]



Copy files to or restore files from an archive medium. If any files are directories, tar acts on the entire subtree. Options need not be preceded by - (though they may be). The exception to this rule is when you are using a long-style option (such as --modification-time). In that case, the exact syntax is:

tar --long-option -function-options files

For example:

tar --modification-time -xvf tarfile.tar

Function options

You must use exactly one of these, and it must come before any other options:

-c, --create

Create a new archive.

-d, --compare

Compare the files stored in tarfile with other-files. Report any differences: missing files, different sizes, different file attributes (such as permissions or modification time).

-r, --append

Append other-files to the end of an existing archive.

-t, --list

Print the names of other-files if they are stored on the archive (if other-files are not specified, print names of all files).

-u, --update

Add files if not in the archive or if modified.

-x, --extract, --get

Extract other-files from an archive (if other-files are not specified, extract all files).

-A, --catenate, --concatenate

Concatenate a second tar file on to the end of the first.

Options

n

Select device n, where n is 0, . The default is found in /etc/default/tar.

drive density

Set drive (0-7) and storage density (l, m, or h, corresponding to low, medium, or high).

--atime-preserve

Preserve original access time on extracted files.

-b, --block-size=n

Set block size to n 512 bytes.

--checkpoint

List directory names encountered.

--exclude=file

Remove file from any list of files.

-f arch, --file=filename

Store files in or extract files from archive arch. Note that filename may take the form hostname:filename.

--force-local

Interpret filenames in the form hostname:filename as local files.

-g, --listed-incremental

Create new-style incremental backup.

-h, --dereference

Dereference symbolic links.

-i, --ignore-zeros

Ignore zero-sized blocks (i.e., EOFs).

--ignore-failed-read

Ignore unreadable files to be archived. Default behavior is to exit when encountering these.

-k, --keep-old-files

When extracting files, do not overwrite files with similar names. Instead, print an error message.

-l, --one-file-system

Do not archive files from other file systems.

-m, --modification-time

Do not restore file modification times; update them to the time of extraction.

--null

Allow filenames to be null-terminated with -T. Override -C.

--old, --portability, --preserve

Equivalent to invoking both the -p and -s options.

-p, --same-permissions, --preserve-permissions

Keep ownership of extracted files same as that of original permissions.

--remove-files

Remove originals after inclusion in archive.

--rsh-command=command

Do not connect to remote host with rsh; instead, use command.

-s, --same-order, --preserve-order

When extracting, sort filenames to correspond to the order in the archive.

--totals

Print byte totals.

--use-compress-program=program

Compress archived files with program, or uncompress extracted files with program.

-v, --verbose

Verbose. Print filenames as they are added or extracted.

-w, --interactive

Wait for user confirmation (y) before taking any actions.

-z, --gzip, --ungzip

Compress files with gzip before archiving them, or uncompress them with gunzip before extracting them.

-C, --directory=directory

cd to directory before beginning tar operation.

-F, --info-script, --new-volume-script=script

Implies -M (multiple archive files). Run script at the end of each file.

-G, --incremental

Create old-style incremental backup.

-K file, --starting-file file

Begin tar operation at file file in archive.

-L, --tape-length=length

Write a maximum of length 1024 bytes to each tape.

-M, --multivolume

Expect archive to multivolume. With -c, create such an archive.

-N date, --after-date date

Ignore files older than date.

-O, --to-stdout

Print extracted files on standard out.

-P, --absolute-paths

Do not remove initial slashes (/) from input filenames.

-R, --record-number

Display archive's record number.

-S, --sparse

Treat short file specially and more efficiently.

-T filename, --files-from filename

Consult filename for files to extract or create.

-V name, --label=name

Name this volume name.

-W, --verify

Check archive for corruption after creation.

-X file, --exclude file

Consult file for list of files to exclude.

-Z, --compress, --uncompress

Compress files with compress before archiving them, or uncompress them with uncompress before extracting them.

Examples

Create an archive of /bin and /usr/bin (c), show the command working (v), and store on the tape in /dev/rmt0:

tar cvf /dev/rmt0 /bin /usr/bin

List the tape's contents in a format like ls -l:

tar tvf /dev/rmt0

Extract the /bin directory:

tar xvf /dev/rmt0 /bin

Create an archive of the current directory and store it in a file backup.tar:

tar cvf - `find . -print > backup.tar

(The - tells tar to store the archive on standard output, which is then redirected.)



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 608
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved