-Oky Dwi Cahyo (10410100115)
-Afifuddin Muhajir (10410100135)
1.Cobalah urutan perintah berikut dan jelaskan masing-masing perintah:
·
$cd
apep@apep-Aspire-4740:~$ cd
apep@apep-Aspire-4740:~$
(untuk masuk pada
direktori tertentu)
·
$pwd
apep@apep-Aspire-4740:~$
cd
apep@apep-Aspire-4740:~$ pwd
/home/apep
apep@apep-Aspire-4740:~$
(untuk menampilkan direktori aktif saat
ini)
·
$ls -al
apep@apep-Aspire-4740:~$ ls -al
total 624
drwxr-xr-x 41 apep apep 4096 2011-10-04 22:20 .
drwxr-xr-x 3
root root 4096 2011-10-03 18:49 ..
drwx------ 3
apep apep 4096 2011-10-03 17:14 .adobe
-rw------- 1
apep apep 291 2011-10-04 22:34
.bash_history
-rwxrwxrwx 1
apep apep 220 2011-10-03 18:49
.bash_logout
-rwxrwxrwx 1
apep apep 274 2011-10-03 18:49 .bashrc
drwx------ 16 apep apep 4096 2011-10-04 22:18 .cache
drwxrwxrwx 3
apep apep 4096 2011-10-03 18:49 .compiz
drwxrwxrwx 23 apep apep 4096 2011-10-04 09:41 .config
-rwxrwxrwx 1
apep apep 402 2011-10-03 18:49
.conkyForecast.config
-rwxrwxrwx 1
apep apep 17955 2011-10-03 18:49
.conky_grey.lua
-rwxrwxrwx 1
apep apep 9697 2011-10-03 18:49
.conkyrc
-rwxrwxrwx 1
apep apep 9697 2011-10-03 18:49
.conkyrc.default
-rwxrwxrwx 1
apep apep 5277 2011-10-03 18:49
.conkyrc.gray
drwx------ 3
apep apep 4096 2011-10-03 18:54 .dbus
drwxrwxrwx 2
apep apep 4096 2011-10-03 19:00 Desktop
-rw-r--r-- 1
apep apep 58 2011-10-04 22:18 .dmrc
drwxrwxrwx 2
apep apep 4096 2011-10-03 18:49
Documents
drwxrwxrwx 2
apep apep 4096 2011-10-03 18:49
Downloads
-rwxrwxrwx 1
apep apep 1521 2011-10-03 18:49 .draw_bg.lua
-rw------- 1
apep apep 16 2011-10-03 18:54
.esd_auth
-rw-r--r-- 1
apep apep 26539 2011-10-03 19:09 .face
drwxr-xr-x 2
apep apep 4096 2011-10-04 22:19
.fontconfig
drwxrwxrwx 5
apep apep 4096 2011-10-04 22:18 .gconf
drwx------ 2 apep
apep 4096 2011-10-04 22:27 .gconfd
-rw-r----- 1
apep apep 0 2011-10-04 09:12
.gksu.lock
drwxrwxrwx 6
apep apep 4096 2011-10-04 13:29 .gnome2
drwx------ 2
apep apep 4096 2011-10-03 18:54
.gnome2_private
apep@apep-Aspire-4740:~$
(untuk menampilkan semua file directory yang ter
hidden atau tidak)
·
$ cd .
(tidak
ada perubahan)
·
$cd ..
apep@apep-Aspire-4740:~$ pwd
/home/apep
apep@apep-Aspire-4740:~$ cd ..
apep@apep-Aspire-4740:/home$
(kembali ke directory sebelumnya)
·
$cd /etc
apep@apep-Aspire-4740:~$ pwd
/home/apep
apep@apep-Aspire-4740:~$ cd ..
apep@apep-Aspire-4740:/home$
(untuk masuk ke directory /etc)
·
ls -al | more
apep@apep-Aspire-4740:/etc$ ls -al | more
total 1476
drwxr-xr-x 167 root root
12288 2011-10-04 22:18 .
drwxr-xr-x
23 root root 4096 2011-10-03 18:50 ..
-rw-r--r-- 1 root
root 15070 2010-05-24 17:27
a2ps.cfg
-rw-r--r-- 1 root
root 2563 2010-05-24 17:27
a2ps-site.cfg
drwxr-xr-x 3 root
root 4096 2011-04-26 07:08
acpi
-rw-r--r-- 1 root
root 2981 2011-04-26 06:57
adduser.conf
drwxr-xr-x 2 root
root 4096 2011-05-01 04:43
adobe
drwxr-xr-x 2 root
root 12288 2011-10-03 18:38
alternatives
-rw-r--r-- 1 root
root 395 2010-06-20 15:11
anacrontab
drwxr-xr-x 6 root
root 4096 2011-04-26 07:01 apm
drwxr-xr-x 3 root
root 4096 2011-04-26 07:12
apparmor
drwxr-xr-x 8 root
root 4096 2011-05-26 22:43
apparmor.d
drwxr-xr-x 4 root
root 4096 2011-04-30 04:05
apport
drwxr-xr-x 6 root
root 4096 2011-10-03 19:08 apt
-rw-r----- 1 root
daemon 144 2010-06-28 02:36
at.deny
drwxr-xr-x 3 root
root 4096 2011-04-26 07:08
avahi
-rw-r--r-- 1 root
root 1939 2011-04-01 02:26
bash.bashrc
-rw-r--r-- 1 root
root 58739 2011-04-05 03:37
bash_completion
drwxr-xr-x 3 root
root 4096 2011-05-26 23:00
bash_completion.d
-rw-r--r-- 1 root
root 344 2011-04-11 16:33
bindresvport.blacklist
-rw-r--r-- 1 root
root 321 2011-03-21 15:28
blkid.conf
lrwxrwxrwx 1 root
root 15 2011-10-03 18:42
blkid.tab -> /dev/.blkid.t
--More--
(untuk menampilkan sebagian data pada file
directory)
·
$ cat passwd
apep@apep-Aspire-4740:/etc$ cat passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List
Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
apep@apep-Aspire-4740:/etc$ ^C
apep@apep-Aspire-4740:/etc$
(untuk menampilkan file-file yang ada pada
directory passwd)
·
$cd -
apep@apep-Aspire-4740:/etc$ ^C
apep@apep-Aspire-4740:/etc$ cd -
/home/apep
apep@apep-Aspire-4740:~$
(kembali ke directory awal)
2.
Mengapa perintah pertama dan kedua
menghasilkan jumlah file yang berbeda?
-
Pada perintah pertama (ls) hanya membuka
folder-folder yang ada pada directory misalnya dekstop,music,pictures dll.
-
Pada perintah kedua (ls -) dapat melihat
file dan folder yang ada pada directory.
-
Pada perintah ke tiga (ls -al) kita dapat
melihat lebih detail file dan folder yang ada pada directory.
Berapa ukuran file dan direktori terbesar dari hasil perintah ketiga ?
Berapa ukuran file dan direktori terbesar dari hasil perintah ketiga ?
-rw-r--r-- 1 apep apep
26539 2011-10-03 19:09 .face
3.
$ touch {report,graph}_{jan,feb,mar}
File apa saja yang terbentuk ?
File apa saja yang terbentuk ?
Maka file yg terbentuk
adalah seperti dibawah ini :
Desktop graph_feb Music
Public report_mar Videos
Documents graph_jan Pictures report_feb Templates Workspace
1_001.png
Downloads graph_mar Projects report_jan Ubuntu One
4.
$ mkdir Projects
$ mkdir Projects/graphs
$ cd Projects
$ mkdir reports
$ cd reports
$ mkdir ../Backups
Gunakan perintah ls untuk melihat hasil pekerjaan anda pada current directory. Perhatikan pohon direktorinya. !
$ mkdir Projects/graphs
$ cd Projects
$ mkdir reports
$ cd reports
$ mkdir ../Backups
Gunakan perintah ls untuk melihat hasil pekerjaan anda pada current directory. Perhatikan pohon direktorinya. !
Maka akan terbentuk suatu folder Project,didalam project terdapat
file graphs dan folder reports.
5. Pindahkan semua file graph ke sub direktori graphs (dalam sub
direktori Projects). Bagaimana perintahnya?
$ mv graph_jan graph_mar
graph_feb /home/engs/Projects/graphs/
6. Pindahkan dua file report ke sub direktori reports. Bagaimana
perintahnya?
$ mv report_jan report_feb
/home/engs/Projects/reports/
7.
Hapus satu
file report. Bagaimana perintahnya?
$ rm report_mar
8.
Pindah ke
direktori Backups dan copy-kan file report pada sub direktori reports ke
direktori Backups. Tuliskan urutan perintahnya dengan menggunakan nama path
absolut atau relatif.
$ cd /home/apep/Projects/Backups
$ cp -r
/home/apep/Projects/reports/report_jan /home/apep/Projects/BackupsLaporan Resmi
Menelusuri Sistem File
Laporan
Resmi
Dari
hasil percobaan yang telah kami lakukan,pada setiap perintah-perintah yang
dimasukkan memiliki tampilan yang berbeda-beda.Dalam percobaan ada yang
menampilkan seluruh keterangan yang telah ada dan ada juga yang menampilkan
nama direktori ataupun filenya saja.
Pesan
eror tidak ada,apabila ada mungkin hanya kesalahan caps lock dari nama suatu
direktori atau file.
Perintah
|
Deskripsi
|
Format
|
pwd
|
Menampilkan direktori aktif
saat ini.
|
pwd
|
Cd
|
Masuk pada
suatu direktori tertentu.
|
cd path-direktori
|
Ls
|
Perintah ls adalah kependekan dari list yang digunakan untuk menampilkan isi suatu
direktori.
|
Ls
|
Touch
|
Perintah touch digunakan untuk menciptakan sebuah file baru yang belum
pernah di buat atau belum ada.
|
touch nama-file
|
Cp
|
Untuk
menggandakan file.
|
cp file1 file2
|
Mv
|
Untuk
memindahkan suatu file atau bisa juga mengganti nama file.
|
mv file1 file2 → Renama file1 menjadi file2
mv coba3 /home/goen/nsmail →
Memindahkan file coba3 ke direktori lain
|
Rm
|
Untuk menghapus
file.
|
rm nama-file
|
Mkdir
|
Untuk membuat
direktori baru.
|
mkdir nama-direktori
|
Rmdir
|
Perintah
menghapus direktori yang telah kosong terlebih dahulu.
|
rmdir
nama-direktori
|
File
|
Untuk melihat
tipe file sebelum membuka
file untuk
menentukan perintah yang tepat dan aplikasi yang dapat digunakan dapat
menggunakan
perintah
|
file nama-file
|
Cat
|
Perintah
menampilkan isi dari sebuah file di layar.
|
cat /nama/suatu/file
|
Less
|
Menampilkan
isi text file per layar.
|
less nama-file
|
Kesimpulan:
Pada
percobaan diatas kami dapat mengetahui bagaimana cara membuat file,folder pada
directory di linux.selain itu kami juga dapat menyimpulkan bahwa pada terminal
di linux cara penggunaan lebih manual di windows.