Comandos ls* Muy Útiles [Linux]

Todo es un archivo en Linux y ls* y sus amigos pueden ayudarte a encontrar más información del sistema de lo que piensas. Los consejos a continuación pueden ser muy útiles cuando necesites encontrar información rápidamente sin ir a través de /proc or sysfs.

#1: lsscsi

Muestra la lista de dispositivos SCSI y sus atributos:
$ lsscsi -g
Ejemplos de salidas:

[0:0:0:0]    disk    Adaptec  RAID1-A          V1.0  /dev/sda   /dev/sg0
[0:1:0:0] disk SEAGATE ST373455SS 0006 - /dev/sg1
[0:1:1:0] disk SEAGATE ST373455SS 0006 - /dev/sg2
[1:0:0:0] cd/dvd TEAC DV-28E-R 1.8A /dev/sr0 /dev/sg3


#2: lsblk



Utiliza este comando para listar dispositivos bloqueados

# lsblk


Ejemplos de salidas:



NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda 8:0 1 68.3G 0 disk
├─sda1 8:1 1 716M 0 part /boot
├─sda2 8:2 1 8G 0 part [SWAP]
└─sda3 8:3 1 59.6G 0 part /
sr0 11:0 1 1024M 0 rom


Para ver el tipo de sistema de archivos:

# lsblk -f


Ejemplo de salidas:



NAME   FSTYPE LABEL MOUNTPOINT
sda
├─sda1 ext2 /boot
├─sda2 swap [SWAP]
└─sda3 ext4 /
sr0


Para mostrar información acerca de permisos:

# lsblk -m


Ejemplo de salidas:



NAME     SIZE OWNER GROUP MODE
sda 68.3G root disk brw-rw----
├─sda1 716M root disk brw-rw----
├─sda2 8G root disk brw-rw----
└─sda3 59.6G root disk brw-rw----
sr0 1024M root cdrom brw-rw----


#3: lsb_release



Utiliza este comando para ver información especifica de la distribución Linux que estés utilizando:

# lsb_release

# lsb_release -a



Ejemplo de salidas:



LSB Version:	:core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.8 (Final)
Release: 5.8
Codename: Final


#4: lsusb



utiliza este comando para ver los buses USB y los dispositivos conectados a ellos:

$ lsusb


Ejemplo de salidas:



Bus 002 Device 004: ID 045e:00db Microsoft Corp. Natural Ergonomic Keyboard 4000 V1.0
Bus 002 Device 003: ID 046d:c52f Logitech, Inc. Wireless Mouse M305
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 413c:8160 Dell Computer Corp. Wireless 365 Bluetooth
Bus 001 Device 006: ID 413c:8162 Dell Computer Corp. Integrated Touchpad [Synaptics]
Bus 001 Device 005: ID 413c:8161 Dell Computer Corp. Integrated Keyboard
Bus 001 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


#5: lscpu



Muestra información acerca de la arquitectura de CPU como el número de CPUs, hilos, núcleos y muchos más  bajo Linux:

$ lscpu


Ejemplo de salida:



Architecture:          x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 8
Thread(s) per core: 2
Core(s) per socket: 4
CPU socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 30
Stepping: 5
CPU MHz: 1199.000
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K


#6: lspci



Muestra información acerca de buses PCI y los dispositivos conectados a ellos::

$ lspci


Ejemplo de salida:



00:00.0 Host bridge: VIA Technologies, Inc. VX800 Host Bridge (rev 14)
00:00.1 Host bridge: VIA Technologies, Inc. VX800/VX820 Error Reporting
00:00.2 Host bridge: VIA Technologies, Inc. VX800/VX820 Host Bus Control
00:00.3 Host bridge: VIA Technologies, Inc. VX800 PCI to PCI Bridge
00:00.4 Host bridge: VIA Technologies, Inc. VX800/VX820 Power Management Control
00:00.5 PIC: VIA Technologies, Inc. VX800/VX820 APIC and Central Traffic Control
00:00.6 Host bridge: VIA Technologies, Inc. VX800/VX820 Scratch Registers
00:00.7 Host bridge: VIA Technologies, Inc. VX800/VX820 North-South Module Interface Control
00:01.0 VGA compatible controller: VIA Technologies, Inc. VX800/VX820 Chrome 9 HC3 Integrated Graphics (rev 11)
00:02.0 PCI bridge: VIA Technologies, Inc. VX800/VX820 PCI Express Root Port
00:03.0 PCI bridge: VIA Technologies, Inc. VX800/VX820 PCI Express Root Port
00:03.1 PCI bridge: VIA Technologies, Inc. VX800/VX820 PCI Express Root Port
00:0f.0 IDE interface: VIA Technologies, Inc. VX800 Serial ATA and EIDE Controller
00:10.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)
00:10.1 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)
00:10.2 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)
00:10.4 USB controller: VIA Technologies, Inc. USB 2.0 (rev 90)
00:11.0 ISA bridge: VIA Technologies, Inc. VX800/VX820 Bus Control and Power Management
00:11.7 Host bridge: VIA Technologies, Inc. VX8xx South-North Module Interface Control
00:13.0 PCI bridge: VIA Technologies, Inc. VX855/VX875/VX900 PCI to PCI Bridge
02:00.0 Ethernet controller: VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (rev 82)
03:00.0 Ethernet controller: VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (rev 82)


El comando lspci puede ser utilizado para descubrir si un hardware PCI en particular es soportado por el kernel actual de Linux. En el ejemplo encontramos si el controlador Ethernet VT6120/ VT6121/ VT6122 de VIA Technologies es soportado o no:

# lspci | grep VT6120


Ejemplo de salida:


02:00.0 Ethernet controller: VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (rev 82)

03:00.0 Ethernet controller: VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (rev 82)



El identificado en el primer campo 02:00.0 y 03:00.0. Ahora usa lspci -n como vemos para obtener el resultado para el dispositivos 02:00.0 and 03:00.0:


# lspci -n | grep '0[2|3]:00.0'


Ejemplo de salida:



02:00.0 0200: 1106:3119 (rev 82)
03:00.0 0200: 1106:3119 (rev 82)


Utiliza el modelo id #3119 para buscar driver, como vemos:

# grep 3119 /lib/modules/$(uname -r)/modules.alias


Ejemplo de salida:



alias pci:v00001106d00003119sv*sd*bc*sc*i* via_velocity


Necesitas utilizar el controlador via_velocity para el adaptador VIA Gigabit ethernet:

# modinfo via_velocity


Ejemplo de salida:



filename:       /lib/modules/2.6.32-5-amd64/kernel/drivers/net/via-velocity.ko
description: VIA Networking Velocity Family Gigabit Ethernet Adapter Driver
license: GPL
author: VIA Networking Technologies, Inc.
alias: pci:v00001106d00003119sv*sd*bc*sc*i*
depends: crc-ccitt
vermagic: 2.6.32-5-amd64 SMP mod_unload modversions
parm: RxDescriptors:Number of receive descriptors (array of int)
parm: TxDescriptors:Number of transmit descriptors (array of int)
parm: rx_thresh:Receive fifo threshold (array of int)
parm: DMA_length:DMA length (array of int)
parm: IP_byte_align:Enable IP header dword aligned (array of int)
parm: txcsum_offload:Enable transmit packet checksum offload (array of int)
parm: flow_control:Enable flow control ability (array of int)
parm: speed_duplex:Setting the speed and duplex mode (array of int)
parm: ValPktLen:Receiving or Drop invalid 802.3 frame (array of int)
parm: wol_opts:Wake On Lan options (array of int)
parm: int_works:Number of packets per interrupt services (array of int)
parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)


#7: lshw / lshw-gtk



Este comando encuentra información detallada acerca de la configuración de hardware del servidor o terminal:




lshw   ### See hardware in a compact format##
lshw -short   ### Only see disks and storage controllers in the system ###
lshw -class disk -class storage   ### Only show all network interfaces in HTML fomrat ###
lshw -html -class network   ## Graphical information about hardware configuration ###
lshw-gtk 


Ejemplo de salida(tomado desde el comando lshw -short):



Fig.01: lshw in action



Fig.01: lshw en acción



#8: ls



Utiliza el comando ls para listar el contenido de un directorio:



 ## common examples of ls, see man page more info ##
ls
ls -l ## long format
ls -F ## appends a character revealing the nature of a file
ls -a ## Show all files including hidden files
ls -R ## recursively lists subdirectories
ls -d ## Get info about a symbolic link or directory
ls -t ## Sort the list of files by modification time
ls -h ## Show sizes in human readable format
ls -B ## In directories, ignore files that end with ‘~’ (backup files)
ls -Z ## Display the SELinux security context
ls --group-directories-first -l ## Show directories first (group directories). Useful on server.
ls --color ## Colorize the ls output
ls --hide='*.txt' -l ## Hide or ignore files whose names ends with .txt 


#9: lsof



Utiliza este comando para listar archivos abiertos, puertos de red, procesos activos y mucho más:



 ### command lsof command examples ##
lsof | less # List all open file
lsof -u vivek -i # See all files opened by user "vivek"
lsof -i 4 -a -p 7007 # List all open IPv4 network files in use by the process whose PID is 7007
lsof -i TCP:80 # Find process running on tcp port 80
lsof -i 6 # List only open IPv6 network files
lsof -i 4 # List only open IPv4 network files
lsof -i TCP:1-1024 # List process open in port range 1 to 1024
lsof -i @server1.cyberciti.biz:2000-2005 # List all files using any protocol on ports 2000 to 2005 of host server1.cyberciti.biz, use:
lsof /dev/sr0 # List all open files on device /dev/sr0
lsof /dev/dvd # Find out why my DVD drive does not eject?
lsof -i -u^root # See all files open by all users except root
lsof /etc/foobar # Find out who's looking at the /etc/foobar file?


#10: lsattr



Utiliza lsattr para listar los atributos de archivo. :

$ lsattr /etc/passwd


Ejemplo de salida:



------------------- /etc/passwd


Utiliza el comando chattr para escribir archivos protegidos bajo Linux:

# echo 'Test' > foobar

# chattr +i foobar


# lsattr foobar



Ejemplo de salida:



----i-------------- foobar


Para eliminar foobar como un root user:

# rm foobar


Ejemplo de salida:



rm: cannot remove `foobar': Operation not permitted


Quita la capacidad IMMUTABLE por ejemplo un archivo no puede ser mofdificado: no puede ser eliminado ni renombrado, ningún enlace puede ser creado a este archivo y ningun dato puede ser escrito al archivo:

# chattr -i foobar



#11: lshal



Utiliza el comando lshal command para mostrar elementos en la base de datos de la HAL (Capa de Abstracción de Hardware - Hardware Abstraction Layer). HAL proporciona una forma fácil a las aplicaciones de descubrir hardware en el sistema:

# lshal | less

### get info about your hardware


# lshal -u /org/freedesktop/Hal/devices/computer





Ejemplo de salida:



udi = '/org/freedesktop/Hal/devices/computer'
info.addons = {'hald-addon-cpufreq', 'hald-addon-acpi'} (string list)
info.callouts.add = {'hal-storage-cleanup-all-mountpoints'} (string list)
info.interfaces = {'org.freedesktop.Hal.Device.SystemPowerManagement'} (string list)
info.product = 'Computer' (string)
info.subsystem = 'unknown' (string)
info.udi = '/org/freedesktop/Hal/devices/computer' (string)
org.freedesktop.Hal.Device.SystemPowerManagement.method_argnames = {'num_seconds_to_sleep', 'num_seconds_to_sleep', '', '', '', 'enable_power_save'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths = {'hal-system-power-suspend', 'hal-system-power-suspend-hybrid', 'hal-system-power-hibernate', 'hal-system-power-shutdown', 'hal-system-power-reboot', 'hal-system-power-set-power-save'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_names = {'Suspend', 'SuspendHybrid', 'Hibernate', 'Shutdown', 'Reboot', 'SetPowerSave'} (string list)
org.freedesktop.Hal.Device.SystemPowerManagement.method_signatures = {'i', 'i', '', '', '', 'b'} (string list)
org.freedesktop.Hal.version = '0.5.14' (string)
org.freedesktop.Hal.version.major = 0 (0x0) (int)
org.freedesktop.Hal.version.micro = 14 (0xe) (int)
org.freedesktop.Hal.version.minor = 5 (0x5) (int)
power_management.acpi.linux.version = '20110623' (string)
power_management.can_hibernate = true (bool)
power_management.can_suspend = true (bool)
power_management.can_suspend_hybrid = true (bool)
power_management.is_powersave_set = false (bool)
power_management.quirk.dpms_on = true (bool)
power_management.quirk.vbe_post = true (bool)
power_management.type = 'acpi' (string)
system.board.product = '0R1203' (string)
system.board.serial = '.XXXXXXX.CN4864304M0335.' (string)
system.board.vendor = 'Dell Inc.' (string)
system.board.version = '' (string)
system.chassis.manufacturer = 'Dell Inc.' (string)
system.chassis.type = 'Portable' (string)
system.firmware.release_date = '12/06/2011' (string)
system.firmware.vendor = 'Dell Inc.' (string)
system.firmware.version = 'A08' (string)
system.formfactor = 'laptop' (string)
system.hardware.primary_video.product = 1567 (0x61f) (int)
system.hardware.primary_video.vendor = 4318 (0x10de) (int)
system.hardware.product = 'Precision M6500' (string)
system.hardware.serial = 'XXXXXXX' (string)
system.hardware.uuid = 'ZZZZC-XXXXXXX-104C-XXXXXXX-YYYYY' (string)
system.hardware.vendor = 'Dell Inc.' (string)
system.hardware.version = '' (string)
system.kernel.machine = 'x86_64' (string)
system.kernel.name = 'Linux' (string)
system.kernel.version = '3.2.0-0.bpo.1-amd64' (string)
system.kernel.version.major = 3 (0x3) (int)
system.kernel.version.micro = 0 (0x0) (int)
system.kernel.version.minor = 2 (0x2) (int)


#12: lsinitramfs



Utiliza este comando para mostrar el contenido de imágenes initramfs. Permite rápidamente elegir el contenido de uno o múltiples archivos. Esto es util para encontrar un driver dado, digamos un driver para un dispositivo RAID incluído en imágenes initramfs o no:



  lsinitramfs /boot/initrd.img-$(uname -r)  # See initramfs content of current running Linux kernel
lsinitramfs /boot/initrd.img-$(uname -r) | grep 'dm-' # Find out if transparent encryption / decryption driver included or not 


Ejemplo de salida (significa que puedo encontrar el disco duro entero):



lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-snapshot.ko
lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-crypt.ko
lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mirror.ko
lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-region-hash.ko
lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-mod.ko
lib/modules/2.6.32-5-amd64/kernel/drivers/md/dm-log.ko


#13: lsmod



Utiliza este comando para listar los controladores de dispositivos:

# lsmod


Ejemplo de salida (tomado de un router Asus RT-16 corriendo Tomato firmware)



Module                  Size  Used by    Tainted: P
ohci_hcd 21552 0
ehci_hcd 40752 0
ext2 67712 0
ext3 136576 0
jbd 62080 1 ext3
mbcache 7280 2 ext2,ext3
usb_storage 50048 0
sd_mod 27440 0
scsi_wait_scan 960 0
scsi_mod 105376 3 usb_storage,sd_mod,scsi_wait_scan
usbcore 147344 4 ohci_hcd,ehci_hcd,usb_storage
nf_nat_pptp 2592 0
nf_conntrack_pptp 6000 1 nf_nat_pptp
nf_nat_proto_gre 2128 1 nf_nat_pptp
nf_conntrack_proto_gre 4160 1 nf_conntrack_pptp
wl 1884144 0
igs 17936 1 wl
emf 22720 2 wl,igs
et 59744 0


Para encontrar si estás ejecutando el modulo llamado ath_pci ingresa:

# lsmod | grep ath_pci



#14: lspcmcia



Ver información acerca de los sockets PCMCIA y dispositivos:

# lspcmcia


Ejemplo de salida:



Socket 0 Bridge:   	[yenta_cardbus] 	(bus ID: 0000:03:01.0)


#15: lswm



Utiliza este comando para descubrir nuevos wiimotes (control remoto Wii) – el principal controlador para la consola Wii de Nintendo. Puede ser utilizado con X para controlar el cursor y mucho más:

# lswm



#16: lsdvd



Utiliza este comando para leer el contenido de un DVD e imprimir el contenido a la pantalla o enviarlo hacia aplicaciones que lo procesen.



  lsdvd     # Default output, show info in human readable 
lsdvd -a # See information about audio streams
lsdvd -c # See chapter information
lsdvd -s # See subpicture information (e.g. subtitles)
lsdvd -s -t track-number
lsdvd -a -t 1 


Ejemplo de salida:



libdvdread: Using libdvdcss version 1.2.10 for DVD access
Disc Title: DVD_VIDEO
Title: 01, Length: 00:22:01.000 Chapters: 06, Cells: 06, Audio streams: 04, Subpictures: 21
Audio: 1, Language: en - English, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x80
Audio: 2, Language: fr - Francais, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x81
Audio: 3, Language: de - Deutsch, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x82
Audio: 4, Language: en - English, Format: ac3, Frequency: 48000, Quantization: drc, Channels: 2, AP: 0, Content: Undefined, Stream id: 0x83


Puedes utilizar mplayer para reproducir dvd:

$ mplayer dvd://1 -dvd-device /dev/dvd



#17: lslk



Utilice este comando para listar todos los bloqueos asociados con los archivos locales del sistema:

# lslk


Ejemplo de salida:



SRC            PID   DEV     INUM        SZ TY M         ST WH        END LEN NAME
portmap 1354 254,1 4309006 5 w 0 0 0 0 0 /var/run/portmap.pid
atd 2124 254,1 4309014 5 w 0 0 0 0 0 /var/run/atd.pid
mysqld 2404 254,1 6824038 5242880 w 0 0 0 0 0 /var/lib/mysql/ib_logfile1
mysqld 2404 254,1 6824037 5242880 w 0 0 0 0 0 /var/lib/mysql/ib_logfile0
mysqld 2404 254,1 6824036 27262976 w 0 0 0 0 0 /var/lib/mysql/ibdata1
(unknown) 2807 254,1 4309033 w 0 0 0 0 0 / (rootfs)
compiz 3398 254,1 7815224 81090 w 0 0 0 0 0 /home/vivek/.nv/GLCache/a147bc5d819e1646d5baf3c8f0a017e4/8bdcca7527c339d4/736353d788902c9e.bin
compiz 3398 254,1 7815223 7668 w 0 0 0 0 0 /home/vivek/.nv/GLCache/a147bc5d819e1646d5baf3c8f0a017e4/8bdcca7527c339d4/736353d788902c9e.toc
python 3427 254,1 4030467 0 w 0 0 0 0 0 /home/vivek/.hplip/hp-systray.lock
chrome 3567 254,1 3956948 12288 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Login Data
chrome 3567 254,1 3957700 135782400 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/History Index 2012-06
chrome 3567 254,1 3957049 120713216 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/History Index 2012-07
chrome 3567 254,1 3956937 15605760 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Favicons
chrome 3567 254,1 3957883 1155072 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Shortcuts
chrome 3567 254,1 3957138 61657088 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/History Index 2012-08
chrome 3567 254,1 3956932 24100864 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/History
chrome 3567 254,1 3957892 3702784 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Network Action Predictor
chrome 3567 254,1 3956926 552960 w 0 1073741824 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Web Data
chrome 3567 254,1 3956809 57344 r 0 1073741826 0 1073742335 0 /home/vivek/.config/google-chrome/Default/Archived History
firefox 3575 254,1 3964960 425984 w 0 1073741824 0 1073742335 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/addons.sqlite
firefox 3575 254,1 3964948 1114112 r 0 1073741826 0 1073742335 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/extensions.sqlite
firefox 3575 254,1 3973490 983040 r 0 1073741826 0 1073742335 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/StumbleUpon/user6896004.sqlite
firefox 3575 254,1 8364042 32768 r 0 128 0 128 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/places.sqlite-shm
firefox 3575 254,1 3964949 20971520 r 0 1073741826 0 1073742335 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/places.sqlite
firefox 3575 254,1 8364040 32768 r 0 128 0 128 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/cookies.sqlite-shm
firefox 3575 254,1 3964961 1048576 r 0 1073741826 0 1073742335 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/cookies.sqlite
firefox 3575 254,1 3964944 0 w 0 0 0 0 0 /home/vivek/.mozilla/firefox/j7nk7e8h.default/.parentlock
chrome 6326 254,1 7815216 88822 w 0 0 0 0 0 /home/vivek/.nv/GLCache/a147bc5d819e1646d5baf3c8f0a017e4/8bdcca7527c339d4/bc35a2d21bc47b1d.bin
chrome 6326 254,1 7815215 2676 w 0 0 0 0 0 /home/vivek/.nv/GLCache/a147bc5d819e1646d5baf3c8f0a017e4/8bdcca7527c339d4/bc35a2d21bc47b1d.toc
transmission 10465 254,1 11468802 0 w 0 0 0 0 0 /home/vivek/.config/transmission/lock


#18: lsmbox



Utiliza este comando para mostrar el número de mensajes en un buzón de correo. Total, no léidos y mensajes nuevos, son los datos que muestra para uno o varios buzones de correo:



  lsmbox !     # Get information about your inbox
lsmbox spam support family # Get information about the mailboxes spam, support, and family
lsmbox ~/foo # Get information about the mailbox foo which resides in your home directory 


#19: lscgroup



Utiliza este comando para listar todos los cgroups – grupos de control – que es una característica del kernel de Linux para limitar el uso de recursos.

# lscgroup



#20: lsdiff



Utiliza este comando para ver cuales archivos son modificados por un parche u ordena los archivos afectados en un parche puedes utilizar:

$ lsdiff patch | sort -u | xargs -rn1 filterdiff patch –i


Para mostrar solo los archivos agregados en un parche:


$ lsdiff -s patch | grep '^+' | cut -c2- | xargs -rn1 filterdiff patch -i


To show the headers of all file hunks:


$ lsdiff -n patch | (while read n file do sed -ne "$n,$(($n+1))p" patch done)



#21: lspst



Utiliza este comando para listar archivos PST (Carpetas Personales de MS Outlook). Produce una lista simple de los datos (contactos, asuntos, etc):

$ lspst mypst-file



#22: lsdnssec



Utiliza el comando lsdnssec para reunir información acerca de archivos relacionados con DNSSEC. Estos archivos pueden ser especificados en la línea de comandos o encontrados en directorios indicados en la línea de comandos. La marca -d controla la cantidad de detalle en la salida de lsdnssec.

# lsdnssec file


lsdnssec muestra la siguiente información acerca de cada zona para la cual tiene información:



keys
Key information is shown about the keys currently in use. A bar graph is included that shows the age of the key with respect to the configured expected key-life time.
This information is collected from any .krf files lsdnssec finds.
rolling status
If any zone keys are being rolled via rollerd, then the status of the rolling state is shown. The time needed to reach the next state is also displayed.
This information is collected from any .rollrec files found by lsdnssec.

0 comentarios: