Difference between revisions of "Perintah Linux L"

From OnnoWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 27: Line 27:
 
[[Perintah Linux Z | Z]]  
 
[[Perintah Linux Z | Z]]  
 
=last=
 
=last=
 +
''Menampilkan daftar pengguna yg terakhir kali login beserta lama waktunya''
 +
 +
last<br>
 +
'''output'''
 +
brain    pts/0        :0.0            Wed Apr 17 09:29  still logged in 
 +
brain    pts/0        :0.0            Wed Apr 17 09:24 - 09:24  (00:00)   
 +
brain    tty7        :0              Wed Apr 17 08:48  still logged in 
 +
reboot  system boot  2.6.35-22-generi Wed Apr 17 08:46 - 11:39  (02:53)   
 +
dst...
 +
 
=lastb=
 
=lastb=
 
=lastlog=
 
=lastlog=
Line 63: Line 73:
 
=lprm=
 
=lprm=
 
=lpstat=
 
=lpstat=
 +
'''Menampilkan informasi status CUPS'''
 +
 +
$ lpstat
 +
<pre>
 +
HP-LaserJet-Professional-p1606dn-15 brain          248832  Tue 02 Apr 2013 01:04:54 PM WIT
 +
Alerts: job-stopped
 +
queued for HP-LaserJet-Professional-p1606dn
 +
</pre>
 +
 
=ls=
 
=ls=
 
''Menampilkan isi direktori''
 
''Menampilkan isi direktori''
Line 154: Line 173:
 
* Sed Mini Tutorial - http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-printing-file-lines-using-address-and-patterns/
 
* Sed Mini Tutorial - http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-printing-file-lines-using-address-and-patterns/
 
* What is kernel module ? - http://www.tldp.org/LDP/lkmpg/2.6/html/x40.html
 
* What is kernel module ? - http://www.tldp.org/LDP/lkmpg/2.6/html/x40.html
 +
* CUPS - http://en.wikipedia.org/wiki/CUPS

Latest revision as of 11:37, 17 April 2013

Indeks - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z

last

Menampilkan daftar pengguna yg terakhir kali login beserta lama waktunya

last
output brain pts/0 :0.0 Wed Apr 17 09:29 still logged in brain pts/0 :0.0 Wed Apr 17 09:24 - 09:24 (00:00) brain tty7 :0 Wed Apr 17 08:48 still logged in reboot system boot 2.6.35-22-generi Wed Apr 17 08:46 - 11:39 (02:53) dst...

lastb

lastlog

ld

ldconfig

ldd

less

lesskey

lftp

lftpget

link

ln

Membuat tautan antara dua file

  • Buat tautan multimedia di /var/www/ agar bisa diakses dari jaringan via http
$ sudo ln -s home/brain/macem-macem/multimedia /var/www/multimedia

loadkeys

locale

locate

Menemukan file berdasarkan nama

  • Cari file/direktori yang mengandung kata 'ubuntu' dan 'xmlrpc'
locate ubuntu | grep xmlrpc

lockfile

logger

login

logname

logrotate

look

losetup

lpadmin

lpinfo

lpmove

lpq

lpr

lprm

lpstat

Menampilkan informasi status CUPS

$ lpstat

HP-LaserJet-Professional-p1606dn-15 brain           248832   Tue 02 Apr 2013 01:04:54 PM WIT
	Alerts: job-stopped
	queued for HP-LaserJet-Professional-p1606dn

ls

Menampilkan isi direktori

  • Tampilkan isi file berdasarkan tanggal & waktu terbaru
ls -alht
  • Tampilkan hanya nama direktori/file
ls -1
  • Mengurutkan file numeric
ls -1 | sort -n
Contoh output:
Sebelum Sesudah 10.JPG 1.JPG 11.JPG 10.JPG 12.JPG 11.JPG 13.JPG 12.JPG 14.JPG 13.JPG 15.JPG 14.JPG 1.JPG 15.JPG

lsattr

lspci

Menampilkan informasi perangkat PCI (Peripheral Component Interconnect)

  • Tampilkan semua perangkat PCI beserta vendornya.
lspci 
Output 00:00.0 Host bridge: Intel Corporation 4 Series Chipset DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01) 00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 01) dst...
  • Tampilkan informasi detail mengenai PCI Audio
  
  lspci -vv | sed -n '/Audio/,/^$/p'
  
  * vv: Very Verbose
  * | : piping (redirect hasil command ke perintah selanjutnya)
  * sed : stream editor
  * -n  : hanya cetak sesuai dengan pola yg diberikan 
  * '/Audio/,/^$/p' : Ambil string diantara dua pola regex.

Output:
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
	Subsystem: ASUSTeK Computer Inc. Device 8445
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 43
	Region 0: Memory at feaf8000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: HDA Intel
	Kernel modules: snd-hda-intel

lsmod

Menampilkan status modul pada kernel

$ lsmod
Output: Module Size Used by vboxnetadp 6968 0 vboxnetflt 18625 0 vboxdrv 229419 2 vboxnetadp,vboxnetflt binfmt_misc 6599 1 dm_crypt 11385 0 snd_hda_intel 22107 4 snd_hda_codec 87552 1 snd_hda_intel

lsusb

Menampilkan informasi port USB dan perangkat yang terkoneksi dengannya.

  • Tampilkan semua info port USB, perangkat yg terkoneksi, dan jumlahnya.
lsusb | cat -n

 * cat -n (berikan nomor pada setiap baris)

Output:
     1	Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
     2	Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
     3	Bus 003 Device 002: ID 046d:c31c Logitech, Inc. --> Terkoneksi dengan keyboard
     4	Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
     5	Bus 002 Device 002: ID 046d:c045 Logitech, Inc. Optical Mouse --> Terkoneksi dengan mouse optic (infra merah)
     6	Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
     7	Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Referensi