User Tools

Site Tools


user:adahmane:portfolio:unixproject0

Case Study 0x1: Archive Handling

The first case study in the greatest class I will ever take.

Objectives

I will learn how to work with archives!

Procedure

lab46:~$ ls
Desktop    Downloads              Maildir  Pictures  Templates  abcd    exp.sh       making.waves  public_html  script2.sh  src.bak
Documents  Firefox_wallpaper.png  Music    Public    Videos     closet  file.txt.gz  new.sh        script1.sh   src         unix.text
lab46:~$ ls /var/public/unix/archives/
archive1.tar.gz  archive2.zip
lab46:~$ cp /var/public/unix/archives/* ~
lab46:~$ ls
Desktop    Firefox_wallpaper.png  Pictures   Videos           archive2.zip  file.txt.gz   public_html  src
Documents  Maildir                Public     abcd             closet        making.waves  script1.sh   src.bak
Downloads  Music                  Templates  archive1.tar.gz  exp.sh        new.sh        script2.sh   unix.text
lab46:~$ gunzip archive1.tar.gz
lab46:~$ ls
Desktop    Firefox_wallpaper.png  Pictures   Videos        archive2.zip  file.txt.gz   public_html  src
Documents  Maildir                Public     abcd          closet        making.waves  script1.sh   src.bak
Downloads  Music                  Templates  archive1.tar  exp.sh        new.sh        script2.sh   unix.text
lab46:~$ unzip archive2.zip
Archive:  archive2.zip
   creating: archives/
 extracting: archives/filea
 extracting: archives/filez
   creating: archives/dir1/
lab46:~$ ls
Desktop    Firefox_wallpaper.png  Pictures   Videos        archive2.zip  exp.sh        new.sh       script2.sh  unix.text
Documents  Maildir                Public     abcd          archives      file.txt.gz   public_html  src
Downloads  Music                  Templates  archive1.tar  closet        making.waves  script1.sh   src.bak
lab46:~$ ls archives/
dir1  filea  filez
lab46:~$ ls archives/dir1/
lab46:~$ cd archives/
lab46:~/archives$ ls
dir1  filea  filez
lab46:~/archives$ ls -la
total 8
drwxr-x--x  3 adahmane lab46   41 Jan 18  2002 .
drwx-----x 33 adahmane lab46 4096 Dec 13 02:28 ..
drwxr-x--x  2 adahmane lab46    6 Jan 18  2002 dir1
-rw-r-----  1 adahmane lab46   20 Jan 18  2002 filea
-rw-r-----  1 adahmane lab46    0 Jan 18  2002 filez
lab46:~/archives$ where_the_heck_is_abc.txt?
-bash: where_the_heck_is_abc.txt?: command not found

So, I couldn't find abc.txt for some reason. Oh well…

user/adahmane/portfolio/unixproject0.txt · Last modified: 2013/12/13 07:35 by adahmane