Pages

Showing posts with label linux administrator command. Show all posts
Showing posts with label linux administrator command. Show all posts

Tuesday, April 9, 2013

catatan administrator part 2


ls  xxx 2> errorfile


===mount iso file==


mount -o loop Fedora-11-i386-dvd.iso /test/


===============


mount


network file system

mount -t nfs 192.168.0.50:/toro /test
umount /test

samba

mount -t cifs //192.168.0.50/toro /test
umount /test



If the Windows box requires a username/password you should use

Code:
mount -t smbfs -o username <your user name> password <your password> //servername/sharename  /mnt/sharename


============

ls > file                 : memasukkan output dr ls ke file

ls >> fileappended        : menambahkan isi direktori skrg ke fileappended


database < data          :    input data ke database


ls *.png | xargs rm       : output yang ada *.png di hapus


=   :  assign variable
==  :  question true / false


/dev/null   : linux trashbin , auto discarded.    -> digunakan sebagai spam email(dibuang).

Monday, April 8, 2013

catatan seorang administrator

struktur hierarchy linux.

/boot

linux kernel. grub bootloader.
isolasi kernel dari file biasa.


/home

buat backup biar lebih mudah
supports quota for user


/media , /mnt

standart buat removable drives



/tmp
buat sharing. essential for gui logins





/var
log files.


=======================

ps

ps a

ps -u toro
ps -u 1000   (1000=id   dapat dilihat pada /etc/passwd)

ps -aux   -> smuanya

pstree


iostat



kill -1 /usr/sbin/smbd   = restart smbd
kill -9 /usr/sbin/smbd   = matikan


highest priority  = -20
lowest            = 19

start new process, priority=-10

nice --10 process  atau
nice -n -10 newprocess


renice -13 pid          //repriotize


cp /etc/passwd .  = mengopy ke local directory

======================================
vi ->   hjkl     h kiri l kanan


u  > undo
dd > delete 1 baris
dw > delet 1 word

yy trus p  >  masukin baris ke buffer trus paste


:! = execute mode

:w new_file_name