CHAPTER-12 : ARCHIVING AND COPYING FILES BETWEEN SYSTEMS

 

CHAPTER 12

ARCHIVING AND COPYING FILES BETWEEN SYSTEMS

1.       Archiving and compressing files are useful when creating backups and transferring data across a network.

a.       True                               b.  False

 

2.       With ---- command, users can gather large sets of files into a single file (archive).

a.       gip                 b. tar                     c. gzip                    d. archive

 

3.       The archive can be compressed using ------ ,  ------, -----------  compression

a.       gzip

b.       bzip2

c.       xz

d.      ALL

 

4.       To use the tar command , one of what following actions can be required:

a.       c (create an archive)

b.      t ( list the contents of an archive)

c.       x (extract an archive)

d.      Any one of  them

 

5.       Commonly used options are with tar –

a.       c                  b. t                 c. x                   d. f                 e. v

 

6.       An archive named ‘archive.tar’ is created with the contents of file1, file2, and file3 in the user's home directory.

a.       tar    cf   archive.tar             file1  file2  file3

b.      tar    xf   archive.tar             file1  file2  file3

c.       tar    cf   ~/archive.tar         file1  file2  file3

d.      tar    vf   archive.tar             file1  file2  file3

e.       tar    cf   /archive.tar           file1  file2  file3

 

7.       Creating a new archive of the /etc folder and all of its content requires root privileges, because only root is a l lowed to read all of the files there. An unprivileged user could create an archive of the /etc folder, but the archive would omit files which do not include read permission for the user and it would omit directories which do not include both read and execute permission for the user.

a.       True                                       b. False

 

8.       List the content of the archive /root/etc.tar:

a.       tar    tf   /root/etc.tar

b.       tar    cf   /root/etc.tar

c.       tar    xf   /root/etc.tar

d.       tar    -tf   /root/etc.tar

 

9.       If a regular user extracts files using tar, that user owns the extracted files.

a.       True                       b. False

 

10.   If files are extracted by root, tar attempts to preserve the original user and group ownership of the files.

a.       True                       b. False

 

11.   Extract the archive    /root/etc.tar to the    /root/etcbackup directory

a.       tar     -xf      /root/etc.tar

b.       cd  /root/etcbackup  ;   tar     -xf      /root/etc.tar

c.       mkdir  /root/etcbackup    ;  tar     -xf      /root/etc.tar

d.      mkdir  /root/etcbackup     ;   cd  /root/etcbackup  ;   tar     -xf      /root/etc.tar

 

12.   To preserve the permissions of an archived file, the ---------- option is to be used when extracting an archive

a.       a                 b.  p                       c.  d                    d.  s

 

13.   Extract the archive /root/etc.tar   to the /root/etcbackup  directory while preserving the permissions of the extracted files:

a.       mkdir  /root/etcbackup     ;   cd  /root/etcbackup  ;   tar     pxf      /root/etc.tar

b.       mkdir  /root/etcbackup     ;   cd  /root/etcbackup  ;   tar     axf      /root/etc.tar

c.       mkdir  /root/etcbackup     ;   cd  /root/etcbackup  ;   tar     sxf      /root/etc.tar

d.       mkdir  /root/etcbackup     ;   cd  /root/etcbackup  ;   tar     dxf      /root/etc.tar

 

14.   To create a compressed tar archive, one of the following tar options can be specified.

a.       z  for  gzip   compression

b.       j  for bzip2 compression

c.       J  for xz compression

d.      Any one of above

 

15.   Create  a gzip-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory

a.       tar     czf     /root/etcbackup.tar.gz      /etc

b.       tar     cjf     /root/etcbackup.tar.gz      /etc

c.       tar     cJf     /root/etcbackup.tar.gz      /etc

d.       tar     xzf     /root/etcbackup.tar.gz      /etc

e.       tar     xjf     /root/etcbackup.tar.gz      /etc

f.        tar     xJf     /root/etcbackup.tar.gz      /etc

 

 

 

 

16.   Create  a bzip2-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory

a.  tar     czf     /root/etcbackup.tar.gz      /etc

b.  tar     cjf     /root/etcbackup.tar.gz      /etc

c.  tar     cJf     /root/etcbackup.tar.gz      /etc

d.  tar     xzf     /root/etcbackup.tar.gz      /etc

e.  tar     xjf     /root/etcbackup.tar.gz      /etc

f.  tar     xJf     /root/etcbackup.tar.gz      /etc

 

17.   Create  a xz-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory

a.  tar     czf     /root/etcbackup.tar.gz      /etc

b.  tar     cjf     /root/etcbackup.tar.gz      /etc

c.  tar     cJf     /root/etcbackup.tar.gz     /etc

d.  tar     xzf     /root/etcbackup.tar.gz      /etc

e.  tar     xjf     /root/etcbackup.tar.gz      /etc

f.  tar     xJf     /root/etcbackup.tar.gz      /etc

 

18.   Extract  a gzip-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory  into /root/gzip  folder

a.  tar     czf     /root/etcbackup.tar.gz      /etc

b.  tar     cjf     /root/etcbackup.tar.gz      /etc

c.  tar     cJf     /root/etcbackup.tar.gz      /etc

d.  mkdir /root/gzip  ;   cd   /root/gzip    ;    tar     xzf     /root/etcbackup.tar.gz    /etc

e.  mkdir /root/gzip  ;   cd   /root/gzip    ;    tar     xzf     /root/etcbackup.tar.gz    

f.  tar     xJf     /root/etcbackup.tar.gz      /etc

 

19.   Extract  a bzip2-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory into /root/bgzip  folder

20.    

a.  tar     czf     /root/etcbackup.tar.gz      /etc

b.  tar     cjf     /root/etcbackup.tar.gz      /etc

c.  tar     cJf     /root/etcbackup.tar.gz      /etc

d. mkdir /root/bzip  ;   cd   /root/bzip    ;     tar     xzf     /root/etcbackup.tar.gz      /etc

e.  mkdir /root/bzip  ;   cd   /root/bzip    ;     tar     xjf     /root/etcbackup.tar.gz     

f.  mkdir /root/bzip  ;   cd   /root/bzip    ;     tar     xjf     /root/etcbackup.tar.gz      /etc

 

 

21.   Extract  a xz-compressed  tar archive     /root/etcbackup.tar.gz   of the /etc directory into /root/xzip  folder

a.  tar     czf     /root/etcbackup.tar.gz      /etc

b.  tar     cjf     /root/etcbackup.tar.gz      /etc

c.  tar     cJf     /root/etcbackup.tar.gz      /etc

d. mkdir /root/xzip  ;   cd   /root/xzip    ;      tar     xJf     /root/etcbackup.tar.gz      /etc

e. mkdir /root/xzip  ;   cd   /root/xzip    ;      tar     xJf     /root/etcbackup.tar.gz     

 

22.   Which the corresponding decompress commands are wrong?

a.       gunzip

b.       bunzip2

c.       bunzip

d.       unxz

e.       xzunzip

 

23.   which is used to compress files?

a.       gzip

b.       bzip2

c.       xz

d.      All

 

24.   which is used to decompress zip files?

a.       gunzip

b.      bunzip2

c.       unxz

d.      All

 

25.   The ssh command is usefu l for securely running shell commands on remote systems

a.       True                       b. False

 

26.   Which command utilizes the SSH server for authentication and encrypted data transfer.

a.       ssh                         b. scp                    c. cp                       d. copy      e. rsync

 

27.   If you want to send a file (/etc/yum.conf) securely to a remote machine’s(10.1.1.10) mushfiq user’s home directory

a.       scp     /etc/yum.conf      10.1.1.10:/home

b.      scp     /etc/yum.conf      10.1.1.10:/home/mushfiq

c.       scp     10.1.1.10:/home     /etc/yum.conf     

d.       scp     10.1.1.10:/home/mushfiq      /etc/yum.conf     

 

28.   if you want to copy from remote machine’s(10.1.1.10) /etc/hosts  file into your  superuser’s home directory.

a.       scp      /etc/hosts          10.1.1.10:/etc/hosts

b.      scp      10.1.1.10:/etc/hosts     /root

c.       scp      10.1.1.10:/etc/hosts    /etc/hosts         

d.       scp      /root      10.1.1.10:/etc/hosts

   

 

29.   If you want to copy whole etc directory(include all files and folders) of remote machine(10.1.1.10) into your superuser’ Desktop.

a.       scp    10.1.1.10:/etc      /root/Desktop

b.      scp    -r  10.1.1.10:/etc      /root/Desktop

c.       scp   -R   10.1.1.10:/etc      /root/Desktop

d.       scp    /root/Desktop   10.1.1.10:/etc      

e.       scp   -r    /root/Desktop   10.1.1.10:/etc      

f.        scp    -R    /root/Desktop   10.1.1.10:/etc      

 

30.   If an interactive tool is preferred when uploading or downloading files to a SSH server, the ------- command can be used

a.       ftp                          b. sftp        c. get               d. put

 

31.   To establish the sftp session with remote host(10.1.1.10)

a.       sftp  10.1.1.10

b.       sftp  -s   10.1.1.10

c.       ftp    10.1.1.10

 

32.   there are the ------- & -------- commands for  uploading and downloading files

a.       get & put

b.      put  &  take

c.       upload  & get

d.      put  &  get

 

33.   the /var/log directory gets a synchronized copy in the /tmp folder. The log directory with its content is created in the /tmp directory.

a.       rsync   -av     /var/log    /tmp

b.      rsync   -av     /tmp     /var/log    

c.       rsync   -v    /var/log    /tmp

d.      rsync   -av     /var/log/    /tmp

 

34.   the remote folder /var/log on serverX can be synchronized to the local directory    /tmp

a.       rsync    -av serverX:/var/log    /tmp

b.      rsync    -a serverX:/var/log    /tmp

c.       rsync    -av      /tmp    serverX:/var/log    

 

 

 


Comments

Popular posts from this blog

Some Questions for MTCNA Exam

ডিপ্লোমা লেভেল এর ইন্ডাস্ট্রিয়াল এটাচমেন্ট এ আসার পূর্বে একটু ভেবে আসার অনুরোধ রইলো

Basic Router & Switch IOS commands