CAFE

§ Tip & Tech §

sap의 파일압축 프로그램 : sapcar.exe

작성자쥔장|작성시간06.07.11|조회수2,198 목록 댓글 0
SAP에서 사용하는 압축파일인  *.sar 파일로 압축을 하거나 압축을 풀 때
사용하는 파일입니다.

usage:

create a new archive:
SAPCAR -c[vir][f archive] [-P] [-C directory]
   [-A filename] [-T filename] [-X filename]
   [-p value] [-V] file1 file2 ...

list the contents of an archive:
SAPCAR -t[vs][f archive] [file1 file2....]

extract files from an archive:
SAPCAR -x[v][f archive] [-R directory] [-A filename]
   [-V] [file1 file2....]

verify the archive:
SAPCAR -d[v][f archive] [-V] [file1 file2....]

append files to an archive:
SAPCAR -a[v][f archive] file1 [file2....]

merge two archives:
SAPCAR -m[v]f "source target"

check availability of files to be processed:
SAPCAR -l [-A filename][-X filename] [file1 file2...]

other options:
-a            : append files to an archive
-A FILE       : get names to include from file FILE
-C DIR        : change to directory DIR
-e            : redirect output from stdout to file sapcar_output
-f FILE       : use archive file FILE (default DEFAULT.SAR)
-g            : ignore case of of archive names while extracting,
                testing or listing archives
-h            : do not change permissions of existing directories
                during extraction
-i            : ignore inaccessible files while creating an archive
-l            : check availabilty of files to be processed
-m            : merge two archives
-n            : print statistical information
-p octalvalue : set permissions of all files in archive to value
-P            : use absolute path-names (use carefully)
-r            : do not resolve symbolic links/shortcuts while creating
                an archive
-R dir        : use dir instead of current directory
-s            : do free space check
-T FILE       : rename files to be included in FILE
-v            : verbosely list files processed
-V            : compute or verify checksum (obsolete, always set,
                for backward compatibility)
-X FILE       : get names to exclude from FILE

examples:
create archive with all files and directories in the current directory
including point files:
SAPCAR -cvf MY.SAR .

create archive with all files and directories in the current directory
without point files:
SAPCAR -cvf MY.SAR *
Note that SAPCAR treats "*" and "?" as wildcard characters. The former
matches any character string, while the latter matches any single
character.

create archive with a complete directory and directory rights:
SAPCAR -cvf MY.SAR dir

create archive with all files of a directory without the directory
itself:
SAPCAR -cvf MY.SAR dir/*
if during extraction with SAPCAR -xvf MY.SAR the directory dir does not
exist it will be created with rights 755

create archive with only the files of a directory
SAPCAR -cvf MY.SAR -C dir .
or better
(cd dir; SAPCAR -cvf ../MY.SAR .)

merge two archives:
SAPCAR -mvf "a source-archive.sar target archive from 27.5.1999.sar"

append files to an archive:
SAPCAR -avf archive.sar file1 file2 file3

extracting/verifying files:
If you try to extract files from an archive that is not a valid SAPCAR
archive according to the version 2 specification SAPCAR assumes an archive
of the old format and automatically invokes the appropriate extraction
routine. If it still cannot handle the archive it will stop execution.
Notice that extracting out of old archives only works with the command
options known to the old CAR application.

using absolute pathnames:
If you create an archive with absolute pathnames the files will be
extracted with exactly these pathnames! SAPCAR does not cut the first
slash like the UNIX tool tar.

specifying a list of archives for extracting/verifying/listing:
You may call SAPCAR with the following command line:
   SAPCAR -xvf "ARCHIVE1.SAR ARCHIVE2.SAR"
thereby specifying a list of archives you want to extract. Note
that you have to delimit archive names with "," if at least one
of the archive names you call SAPCAR with contains at least one
whitespace character; e.g.
   SAPCAR -xvf "ARCHIVE WITH BLANK.SAR, ARCHIVE.SAR, ARCHIVE2.SAR"

using A, T and X option:
All entries in the specified files are treated relative to the current
working directory unless the entry is an absolute pathname (in this case
the relevant file will be archived with an absolute pathname).
If you want to specify a directory path in these files use the slash ("/")
as path delimiter.

Use the pipe sign ("|") to separate old and new names in a T file when
these names contain whitespaces. If neither the old file name nor the new
one contains any whitespaces you may use whitespaces as delimiter between
old and new name (that means a valid CAR rename file is also a valid SAPCAR
rename file and hence may be given with the -T option).
Note that pattern matching is not supported for entries in -A, -T and -X
files (i.e. "*.cpp" will not result in processing all cpp-files
in the current directory).

Lines starting with "#" as the first non whitespace character will be
ignored by SAPCAR (this also holds true of lines containing only
whitespaces).

If you insert a directory name in the specified file the complete
directory with the directory rights will be included in the archive.

If you specify dir/filename only this file will be included in
the archive. During extraction the directory dir will be created if
it does not exist.

using -C option:
All relative filenames in the command line are treated as relative
to the specified directory.

SAPCAR 2.0, build 317721

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼