Compress files into tar file
tar(
tarfilename
,files
)
tar(tarfilename
,files
,rootfolder
)entrynames
=
tar(...)
tar(
creates
a tar file named tarfilename
,files
)tarfilename
from the list
of files and folders specified in files
.
Folders recursively include all of their content. If files
includes
relative paths, the tar file also contains relative paths. The tar
file does not include absolute paths.
tar(
specifies
the path for tarfilename
,files
,rootfolder
)files
relative to rootfolder
rather
than the current folder. Relative paths in the tar file reflect the
relative paths in files
, and do not include
path information from rootfolder
.
returns a cell array of character vectors containing
the names of the files in entrynames
=
tar(...)tarfilename
.
If files
includes relative paths, entrynames
also
contains relative paths.
|
Name of the tar file, specified as a character vector. If |
|
List of files or folders included in Individual files that are on the MATLAB path can be specified as partial path names. Otherwise an individual file can be specified relative to the current folder or with an absolute path. Folders
must be specified relative to the current folder or with absolute
paths. On UNIX® systems, folders can also start with |
|
Path for |
Tar all files in the current folder to the file backup.tgz
.
tar('backup.tgz','.');