step 1) tar -cvf /tmp/backup.tar /etc
step 2) ls -l /tmp
step3) gzip /tmp /backup.tar
step 4) ls -l /tmp
step 5)gunzip /tmp/backup.tar.gz
step 6) ls -l /tmp
step 7)tar -xvf /tmp/backup.tar
step 8) will see directory etc is extracted
[root@ip-172-31-40-252 tmp]# ls -l
total 28276
-rw-r--r-- 1 root root 28928000 Jun 2 04:03 backup.tar
drwxr-xr-x 82 root root 8192 Jun 2 03:55 etc
No comments:
Post a Comment