Zipping: -
Tar Command: -
Q) How to create a tar ball file.tar from the files f1.txt,f45.csv,f2.dat
?
Ans - $ tar –cvf file.tar f1.txt f45.csv f2.dat<Enter –
Key>
Where c – create
V – verbose mode
f - forcefully
Q) How to extracts all the files from the tar ball file.tar
?
Ans - $ tar –xvf file.tar<Enter – Key>
Where x – extracts
V – verbose mode
f – forcefully
Q) How to add a file f3.dat in the tar file file.tar ?
Ans - $ tar –rf file.tar f3.dat<Enter – Key>
Where r – append
Q) How to delete a file f1.txt from the tar file file.tar ?
Ans - $ tar - - delete –f file.tar f1.txt<Enter – Key>
Q) How to zip a tar ball ?
Ans - $ tar –czvf f1.gz.tar f1.txt f2.csv f3.dat<Enter –
Key>
Q) How to extract a tar ball ?
Ans - $ tar –xzvf f1.gz.tar<Enter – Key>
Q) What is the use of tar ball ?
Ans – It helps in moving the files from one environment i.e.
development or testing to another i.e. testing or production.
Q) How to zip multiple files or single file ?
Ans - $ zip file.zip f1.txt<Enter – Key>
Or
$ zip file23.zip f67.txt f45.dat fnv.png<Enter – Key>
Q) How to unzip a zipped file or extracts the original files
from the zipped file ?
Ans - $ unzip file.zip<Enter – Key>
Q) Which command is used to zip a file at its original
location ?
Ans – gzip
$ gzip f1.txt f2.csv f3.dat<Enter – Key>
Q) How to unzip the zipped files at its original location ?
Ans - $ gunzip f1.txt.gz f2.csv.gz f3.dat.gz<Enter –
Key>
Top Command: -
Q) What is the uses of top command ?
Ans –
1.
It is a
health check command which is used basically the percentage of CPU Used and
memory taken by each process and since how long the processes are running.
2.
This is the snap shot of the system at a
particular time which are ongoing processes.
3.
The default refresh time is 2 seconds.
No comments:
Post a Comment