Download time tar file gnu.org






















Although many have participated, most development thanks go to Roger While Keisuke Nishida The file gnu-cobol It is NOT heavy optimized and has some minor bugs other binaries created from the source tarball don't have. If you cannot unpack 7z-archives simply rename this file to exe for getting a self-extracting archive. Mit einem Experten sprechen. Thanks for helping keep SourceForge clean. X You seem to have CSS turned off. Briefly describe the problem required :.

Upload screenshot of ad required :. Bzipped tar archive and its signature. Gzipped cpio archive and its signature. Improved record size autodetection Use of lseek on seekable archives New command line option --warning New command line option --level Improved behavior if some files were removed during incremental dumps Modification times of PAX extended headers Time references in the --pax-option argument Augmented environment of the --to-command script Bugfixes: Fix handling of hard link targets by -c --transform Fix hard links recognition with -c --remove-files Fix restoring files from backup debian bug Correctly restore modes and permissions on existing directories The --remove-files option removes files only if they were succesfully stored in the archive Fix storing and listing of the volume labels in POSIX format Improve algorithm for splitting long file names ustar format Fix possible memory overflow in the rmt client code CVE 1.

Support for xz compression --xz option Short option -J is reassigned as a shortcut for --xz The option -I is a shortcut for --use-compress-program The --no-recursive option works with --incremental 1. New short option -J , an alias for --lzma New option --lzop New option --no-auto-compress , Cancels the effect of previous --auto-compress -a option New option --no-null Cancels the effect of previous --null option.

Compressed format recognition If tar is unable to determine archive compression format, it falls back to using archive suffix to determine it. Transformation scope flags Name transformation expressions understand additional flags that control type of archive members affected by them.

The flags are: r Apply transformation to regular archive members. The scope flags are listed in the third part of a s expression, e. This is fixed. Fixed record size autodetection. If detected record size differs from the expected value either default, or set on the command line , tar prints a warning if verbosity level is set to 1 or greater, i.

New option --auto-compress -a With --create , selects compression algorithm basing on the suffix of the archive file name. New option --hard-dereference During archive creation, dereferences hard links and stores the files they refer to, instead of creating usual hard link members type '1'. New option --checkpoint-action This action allows to specify an action to be executed upon hitting a checkpoint.

New options --no-check-device , --check-device. The --transform option. Incremental archives Improved sped up extracting from incremental archives. Fix bug introduced in version 1. New option --exclude-vcs excludes directories and files, created by several widely used version control systems, e. Fixed handling of renamed files in listed incremental archives. Fixed --version output. Recognition of broken archives. Fix file padding in case of truncation of the input file to zero size.

Licensed under the GPLv3. Several bugs in the testsuite are fixed. Fix archivation of sparse files in posix mode.

Previous versions padded sparse members with spurious zero blocks. Fix operation of --verify --listed-incremental. Version 1. Fix --occurence. In previous versions it continued scanning the archive even though all requested members has already been extracted. Scope of --transform and --strip-components options.

New option --exclude-tag allows to specify exclusion tag files , i. TAG file from being archived. Previous versions excluded directory contents only, while the directories themselves were still added to the archive. Support for reading ustar type N header logical records has been removed. Unfortunately its implementation had security holes. For SMBs with to 1, employees that want to develop a culture of giving and volunteering.

You seem to have CSS turned off. Please don't fill out this field. Please provide the ad click URL, if possible:. Oh no! Some styles failed to load. Help Create Join Login. Application Development. IT Management. Project Management. Resources Blog Articles. Menu Help Create Join Login. Open Source Commercial.

Other License 1. NET 1. Planning 11 Inactive 6 Mature 5. Freshness Recently updated Mit einem Experten sprechen. Say no to bad customer service and experience the Linode difference. Not having the option name written out mnemonically can affect how well you remember which option does what, and therefore where different names have to be placed. You can archive a directory by specifying its directory name as a file name argument to tar.

The files in the directory will be archived relative to the working directory, and the directory will be re-created along with its contents when the archive is extracted.

To archive a directory, first move to its superior directory. If you have followed the previous instructions in this tutorial, you should type:. Before trying to archive a directory from its superior directory, you should make sure you have write access to the superior directory itself, not only the directory you are trying archive with tar. For example, you will probably not be able to store your home directory in an archive by invoking tar from the root directory; See section Absolute File Names.

It makes no sense to put an archive into itself. GNU tar will continue in this case, and create the archive normally, except for the exclusion of that one file. Please note: Other implementations of tar may not be so clever; they will enter an infinite loop when this happens, so you should not depend on this behavior unless you are certain you are running GNU tar.

In general, it is wise to always place the archive outside of the directory being dumped. Frequently, you will find yourself wanting to determine exactly what a particular archive contains. In this case, tar will only list the names of members you identify. This output is described in detail in verbose member listing. It is important to notice that the output of tar --list --verbose does not necessarily match that produced by tar --create --verbose while creating the archive.

It is because GNU tar , unless told explicitly not to do so, removes some directory prefixes from file names before storing them in the archive See section Absolute File Names , for more information. In other words, in verbose mode GNU tar shows file names when creating an archive and member names when listing it. Consider this example, run from your home directory:. This default behavior can sometimes be inconvenient. Since tar preserves file names, those you wish to list must be specified as they appear in the archive i.

Continuing the example above:. See section Wildcards Patterns and Matching , for a detailed discussion of globbing patterns and related tar command line options. When you use a directory name as a file name argument, tar acts on all the files including sub-directories in that directory. The act of retrieving members from an archive so they can be used and manipulated as unarchived files again is called extraction. Extracting an archive does not modify the archive in any way; you can extract it multiple times if you want or need to.

The files can be directories containing other files, or not. To extract an entire archive, specify the archive file name only, with no individual file names as arguments. For example,. Remember that as with other operations, specifying the exact member name is important See section Commands That Will Fail , for more examples.

Extracting directories which are members of an archive is similar to extracting other files. The main difference to be aware of is that if the extracted directory has the same name as any directory already in the working directory, then files in the extracted directory will be placed into the directory of the same name. Likewise, if there are files in the pre-existing directory with the same names as the members which you extract, the files from the extracted archive will replace the files already in the working directory and possible subdirectories.

This will happen regardless of whether or not the files in the working directory were more recent than those extracted there exist, however, special options that alter this behavior see section Changing How tar Writes Files. However, if a file was stored with a directory name as part of its file name, and that directory does not exist under the working directory when the file is extracted, tar will create the directory.

You may either extract the entire archive, or you may extract only the files you just deleted. To extract only the files you deleted, use the following command:. Extracting files from archives can overwrite files that already exist. Members with those names are not in the archive. You must use the correct member names, or wildcards, in order to extract the files from the archive.

If you have forgotten the correct names of the files in the archive, use tar --list --verbose to list them correctly. There are options that allow you to strip away a certain number of leading directory components see section Modifying File and Member Names.

This chapter is about how one invokes the GNU tar command, from the command synopsis see section General Synopsis of tar. There are numerous options, and many styles for writing them. One mandatory option specifies the operation tar should perform see section Operations , other options are meant to detail how this operation should be performed see section tar Options. Non-option arguments are not always interpreted the same way, depending on what the operation is.

You will find in this chapter everything about option styles and rules for writing them see section The Three Option Styles. On the other hand, operations and options are fully described elsewhere, in other chapters. Here, you will find only synthetic descriptions for operations and options, together with pointers to other parts of the tar manual.

Some options are so special they are fully described right in this chapter. They have the effect of inhibiting the normal operation of tar or else, they globally alter the amount of feedback the user receives about what is going on.

You can use tar to store files in an archive, to extract them from an archive, and to do other types of archive manipulation. The primary argument to tar , which is called the operation , specifies which action to take. The other arguments to tar are either options , which change the way tar performs an operation, or file names or archive members, which specify the files or members tar is to act on.

You can actually type in arguments in any order, even if in this manual the options always precede the other arguments, to make examples easier to understand.

Further, the option stating the main operation mode the tar main command is usually given first. These files or hierarchies should already exist in the file system, prior to the execution of the tar command. If you give the name of a directory as either a file name or a member name, then tar acts recursively on all the files and directories beneath that directory. The distinction between file names and archive member names is especially important when shell globbing is used, and sometimes a source of confusion for newcomers.

See section Wildcards Patterns and Matching , for more information about globbing. The problem is that shells may only glob using existing files in the file system. Only tar itself may glob on archive members, so when needed, you must ensure that wildcard characters reach tar without being interpreted by the shell first.

Besides successful exits, GNU tar may fail for many reasons. Some reasons correspond to bad usage, that is, when the tar command line is improperly written. Errors may be encountered later, while processing the archive or the files.

Some errors are recoverable, in which case the failure is delayed until tar has completed all its work. Some errors are such that it would be not meaningful, or at least risky, to continue processing: tar then aborts processing immediately. All abnormal exits, whether immediate or delayed, should always be clearly diagnosed on stderr , after a line stating the nature of the error.

Possible exit codes of GNU tar are summarized in the following table:. This means that some fatal, unrecoverable error occurred. If tar has invoked a subprocess and that subprocess exited with a nonzero exit code, tar exits with that code as well. This can happen, for example, if tar was given some compression option see section Creating and Reading Compressed Archives and the external compressor program failed.

Another example is rmt failure during backup to the remote device see section Remote Tape Server. GNU tar has a total of eight operating modes which allow you to perform a variety of tasks.

You are required to choose one operating mode each time you employ the tar program by specifying one, and only one operation as an argument to the tar command the corresponding options may be found at The Three Most Frequently Used Operations and The Five Advanced tar Operations.

Depending on circumstances, you may also wish to customize how the chosen operating mode behaves. For example, you may wish to change the way the output looks, or the format of the files that you wish to archive may require you to do something special in order to make the archive look right. As we said in the tutorial, options are arguments to tar which are as their name suggests optional. Depending on the operating mode, you may specify one or more options.

Different options will have different effects, but in general they all change details of the operation, such as archive format, archive name, or level of user interaction. Some options make sense with all operating modes, while others are meaningful only with particular modes. You will likely use some options frequently, while you will only use others infrequently, or not at all. A full list of options is available in see section All tar Options.

Option specifications are separated by whitespace. A backslash escapes the next character, so it can be used to specify an option containing whitespace or a backslash. Note that tar options are case sensitive. In addition to the eight operations, there are many options to tar , and three different styles for writing both: long mnemonic form, short form, and old style.

These styles are discussed below. Both the options and the operations can be written in any of these three styles. There are three styles for writing operations and options to the command line invoking tar. The different styles were developed at different times during the history of tar. These styles will be presented below, from the most recent to the oldest. Some options must take an argument 2. Where you place the arguments generally depends on which style of options you choose.

We will detail specific information relevant to each option style in the sections on the different option styles, below. The differences are subtle, yet can often be very important; incorrect option placement can cause you to overwrite a number of important files.

We urge you to note these differences, and only use the option style s which makes the most sense to you until you feel comfortable with the others. Some options may take an argument. Such options may have at most long and short forms, they do not have old style equivalent. The rules for specifying an argument for such options are stricter than those for specifying mandatory arguments.

Please, pay special attention to them. Each option has at least one long or mnemonic name starting with two dashes in a row, e. The long names are more clear than their corresponding short or old names. In addition, long option names can be given unique abbreviations.

Long options are meant to be obvious and easy to remember, and their meanings are generally easier to discern than those of their corresponding short options see below. For example:. Long options which require arguments take those arguments immediately following the option name. There are two ways of specifying a mandatory argument. It can be separated from the option name either by an equal sign, or by any amount of white space characters. In contrast, optional arguments must always be introduced using an equal sign.

Most options also have a short option name. Short options start with a single dash, and are followed by a single character, e. The forms are absolutely identical in function; they are interchangeable. Short options which require arguments take their arguments immediately following the option, usually separated by white space.

It is also possible to stick the argument right after the short option name, using no intervening space. Short options which take optional arguments take their arguments immediately following the option letter, without any intervening white space characters.

When short options are clumped as a set, use one single dash for them all, e. Only the last option in such a set is allowed to have an argument 3. When the options are separated, the argument for each option which requires an argument directly follows that option, as is usual for Unix programs.

If you do not move the arguments properly, you may end up overwriting files. GNU tar supports old options not only for historical reasons, but also because many people are used to them.

If the first argument does not start with a dash, you are announcing the old option style instead of the short option style; old options are decoded differently. Like short options, old options are single letters. However, old options must be written together as a single clumped set, without spaces separating them or dashes preceding them. This set of letters must be the first to appear on the command line, after the tar program name and some white space; old options cannot appear anywhere else.

The letter of an old option is exactly the same letter as the corresponding short option. When options that need arguments are given together with the command, all the associated arguments follow, in the same order as the options. Thus, the example given previously could also be written in the old style as follows:. The old style syntax can make it difficult to match option letters with their corresponding arguments, and is often confusing.

If you want to reorder the letters in the old option argument, be sure to reorder any corresponding argument appropriately. This old way of writing tar options can surprise even experienced users. For example, the two commands:. All three styles may be intermixed in a single tar command, so long as the rules for each style are fully respected 4.

Old style options and either of the modern styles of options may be mixed within a single tar command. However, old style options must be introduced as the first arguments only, following the rule for old options old options must appear directly after the tar command and some white space. Modern options may be given only after all arguments to the old options have been collected.

If this rule is not respected, a modern option might be falsely interpreted as the value of the argument to one of the old style options.

For example, all the following commands are wholly equivalent, and illustrate the many combinations and orderings of option styles. These last examples mean something completely different from what the user intended judging based on the example in the previous set which uses long options, whose intent is therefore very clear.

The coming manual sections contain an alphabetical listing of all tar operations and options, with brief descriptions and cross-references to more in-depth explanations in the body of the manual.

They also contain an alphabetically arranged table of the short option forms with their corresponding long option. You can use this table as a reference for deciphering tar commands in scripts. Appends files to the end of the archive. Compares archive members with their counterparts in the file system, and reports differences in file size, mode, owner, modification date and contents. Appends other tar archives to the end of the archive. Creates a new tar archive. See section How to Create Archives.

Deletes members from the archive. Extracts members from the archive into the file system. See section How to Extract Members from an Archive. Adds files to the end of the archive, but only if they are newer than their counterparts already in the archive, or if they do not already exist in the archive.

See section Updating an Archive. This option disables that behavior. See section Absolute File Names. See section Controlling Pattern-Matching. Attempt to preserve the access time of files when reading them. This option currently is effective only on files that you own, unless you have superuser privileges.

This may cause problems if other programs are reading the file at the same time, as the times of their accesses will be lost. On most platforms restoring the access time also requires tar to restore the data modification time too, so this option may also cause problems if other programs are writing the file at the same time tar attempts to detect this situation, but cannot do so reliably due to race conditions.

Worse, on most platforms restoring the access time also updates the status change time, which means that this option is incompatible with incremental backups. As of this writing November this works only with Linux, and only with Linux kernels 2. Worse, there is currently no reliable way to know whether this feature actually works. But other times tar might think that the option works when it actually does not. However, mounting typically requires superuser privileges and can be a pain to manage.

See section Creating and Reading Compressed Archives. Rather than deleting files from the file system, tar will back them up using simple or numbered backups, depending upon backup-type.

See section Backup options. With this option present, tar prints error messages for read errors with the block number in the archive file.

See block-number. Sets the blocking factor tar uses to blocking x bytes per record. See section The Blocking Factor of an Archive. This option tells tar to read or write archives through bzip2. Check device numbers when creating a list of modified files for incremental archiving. This is the default. See device numbers , for a detailed description. This option directs tar to print periodic checkpoint messages as it reads through the archive. For a detailed description, see Checkpoints.

Instruct tar to execute an action upon hitting a breakpoint. Here we give only a brief outline. See section Checkpoints , for a complete description.

Display a textual message on the standard error, with the status and number of the checkpoint. Display string on the standard error. Before output, the string is subject to meta-character expansion. The supplied actions will be executed in order of their appearance in the command line. If this option was given, tar will check the number of links dumped for each processed file. If this number does not match the total number of hard links for the file, a warning message will be output 5.

This allows you to directly act on archives while saving space. See section Asking for Confirmation During Operations. Delay setting modification times and permissions of extracted directories until the end of extraction. See section Directory Modification Times and Permissions. When reading or writing a file to be archived, tar accesses the file that a symbolic link points to, rather than the symlink itself.

See section Symbolic Links. When this option is specified, tar will change its current directory to dir before performing any operations. When this option is used during archive creation, it is order sensitive. See section Changing the Working Directory. When performing operations, tar will skip files that match pattern. See section Excluding Some Files. Exclude from dump any directory containing a valid cache directory tag file, but still dump the directory node and the tag file itself.

Exclude from dump any directory containing a valid cache directory tag file, but still dump the directory node itself. Exclude from dump any directory containing a valid cache directory tag file. Before dumping a directory, tar checks if it contains file.

If so, exclusion patterns are read from this file. The patterns affect only the directory itself. The patterns affect the directory and all itssubdirectories. Exclude from dump any directory containing file named file , but dump the directory node and file itself. See section exclude-tag. Exclude from dump the contents of any directory containing file named file , but dump the directory node itself. See section exclude-tag-under. Exclude from dump any directory containing file named file.

See section exclude-tag-all. Exclude from dump directories and files, that are internal for some widely used version control systems. Exclude files that match patterns read from VCS-specific ignore files. The semantics of each file is the same as for the corresponding VCS, e. See exclude-vcs-ignores.

See section Reading Names from a File. See local and remote archives. Creates archive in GNU tar 1. See section Controlling the Archive Format , for a detailed discussion of these formats. This option instructs tar to print file times to their full resolution.

Usually this means 1-second resolution, but that depends on the underlying file system. Files added to the tar archive will have a group ID of group , rather than the group from the source file.

See section Overriding File Metadata. Read owner group translation map from file. See section Overriding File Metadata , for a detailed description. This option tells tar to read or write archives through gzip , allowing tar to directly operate on several kinds of compressed archives transparently.

When creating an archive, dereference hard links and store the files they refer to, instead of creating usual hard link members. See section GNU tar documentation. Use method to detect holes in sparse files. See section Archiving Sparse Files. Ignore case when matching member or file names with patterns. Ignore exit codes of subprocesses. See section Writing to an External Program. Do not exit unsuccessfully merely because an unreadable file was encountered. See section Ignore Failed Read.

With this option, tar will ignore zeroed blocks in the archive, which normally signals EOF. See section Options to Help Read Archives.

Informs tar that it is working with an old GNU -format incremental backup archive. It is intended primarily for backwards compatibility only. See section Using tar to Perform Incremental Dumps , for a detailed discussion of incremental archives.

When tar is performing multi-tape backups, command is run at the end of each tape. If it exits with nonzero status, tar fails immediately. See info-script , for a detailed discussion of this feature.

Specifies that tar should ask the user for confirmation before performing potentially destructive options, such as overwriting files. This option changes the behavior of tar when it encounters a symlink with the same name as the directory that it is about to extract. By default, in this case tar would first remove the symlink and then proceed extracting the directory.

Do not replace existing files that are newer than their archive copies when extracting files from an archive. Do not overwrite existing files when extracting files from an archive. Return error if such files exist. See also --skip-old-files. When creating an archive, instructs tar to write name as a name record in the archive. When extracting or listing archives, tar will only operate on archives that have a label matching the pattern specified in name.



0コメント