Storage Commands:-: Compress:-You Can Use This Command To Reduce The Size of A File
Storage Commands:-: Compress:-You Can Use This Command To Reduce The Size of A File
Storage Commands:-: Compress:-You Can Use This Command To Reduce The Size of A File
Compress :- You can use this command to reduce the size of a file.
The compressed file retains the permi & time attributes of the original file.
Cpio:- You can use this command to copy files to archival medium from disk or to
(1) cpio –o to read standard input for path names & copy them to standard o/p.
(2) cpio –i to read from standard input archival files & create disk files.
(3) cpio –p to read standard input for the pathname & copy to the specified
directory.
Flag :-
r:- Copy files interacting with the option of modifying the filename
Example :- (1) If you have a list of files that you want to copy to a diskfile.
(2) If you want to copy all files from the current directory as well as the
Files in its subdirectories , use the –p flag.Additionally, you can use the –d flag .so that all
the needed directories are created.
DD :- can be used to read data from the std. Input & copy it to the std. O/p after converting data
Flags :-
files=filename Specify the no. of files to be copied ( such as from a tape containing
multiple files)
conv=conversion parameter Specify the type of conversion to be used. Some of the values
and ucase.
Example :-
(1) If you have a file from a system that stores data in EBCDIC format & U want to
Convert the data to ASCII.
(2) If you want to copy file1 on disk to a tape with a block size of 1024,
Pack:- if U want to save disk space,use the pack command to compress a file in a way similar to the
Compress command.
-f force packing
Pcat file1.2
Tar :- it is used to copy files from disk to an archival medium ( usually tape) or vice-versa.
:- The tar command does not provide any recovery from tap emors.
Flag :-
-c Create a new archive & write the file details at the begging of the archieve.
If you specify a directory name -> all the files in the directory are extracted.
If no file on directory is specified, all the files in the specified archive are extracted.
-p Restore the files with their original permition, ignoring the current setting of the umask.
-f archive : Use the specified archive as the archive name istead of the system default.
Examples:-
(1) If you want to extract all the files in the /u/testuser directory from the archive file on the
/dev/emt1 tape device.
Uncompress:- can be ued to uncompress a file that has earlier been compressed using the compress
Command .
Umcompress file1.2
Unpack :- can be used to uncompress files that have the .z extention & that have been compressed
Status Commands:-
Date:- used to display the current date and time in a specified format.
Env :- can be used to display the current environment or to chane one or more of the ENV
-i to indicate that only the variables setup as part of the env. Command are used for
Example :-
(1) assumed that my job script that displays the current setting of the Env variables
called ZANG.
If U execute the script my job as a part of the ENV command without modifying the
LANG variable.
Iostat:- can be used to obtain statistics about the cpu ; clicks & tty of a system.
Report. But U can use various flags to collect information about other system activities.
Flags:-
-A report data on all system activities.
UNAME:- Display details about the O/S and computer system on the std. O/P.
Flag:-
-a Display the machine ID, the release number of the O/S ,System name.
Vmstat:- can be used to get information about the processes virtual memeory, physical
Volumes , and CPU activity include CPU utilization , virtual memory and physical
Volume. This information can be used to monitor the load on the system.
Vmstat 5 5 ‘