One Day One Cmd

Place for playing with commands…

Monthly Archives: July 2011

Day 93: $chsh command

ODOC: About chsh command
Enables a user to change their login shell.

Syntax

chsh [-s login_shell] [user]

-s -> login_shell Enables a user to specify the login shell.

Examples

chsh

Used without the -s option enables the user to specify the path of their shell.

VALID SHELLS

chsh will accept the full pathname of any executable file on the system. However, it will issue a warning if the shell is not listed in the /etc/shells file. On the other hand, it can also be configured such that it will only accept shells listed in this file, unless you are root.

With Regards,
S. Praveen

Advertisements

Day 92: $stty command

ODOC: About stty command
Sets options for your terminal.

Examples:

stty
typing stty alone on a dialup connection would list the information about the connection. Below is an example of what may be displayed.

praveen@praveen:~$ stty
speed 38400 baud; -parity
rows = 49; columns = 132; ypixels = 0; xpixels = 0;
erase = ^h; swtch = ;
brkint -inpck -istrip icrnl -ixany imaxbel onlcr tab3
echo echoe echok echoctl echoke iexten 

With Regards,
S. Praveen

Day 91: $talk command

ODOC: About talk command

Talk with other logged in users.

First you can install talk by simply enter on the terminal following command,

praveen@praveen:~$ sudo apt-get install talk

Syntax

talk person [ttyname]

person -> If you wish to talk to someone on your own machine, then person is just the person’s login name. If you wish to talk to a user on another host, then person is of the form ‘user@host’.

ttyname -> If you wish to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name, where ttyname is of the form ‘ttyXX’ or ‘pts/X’.

praveen@praveen:~$talk praveen

Typing the above command would start a talking session with the user praveen.

With Regards,
S. Praveen

Day 90: $w command

ODOC: About w command

Displays information about the users currently on the machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

Syntax
w [-husfVo] [user]

-h -> Don’t print the header.

-u -> Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a “su” and do a “w” and a “w -u”.

-s -> Use the short format. Don’t print the login time, JCPU or PCPU times.

-f -> Toggle printing the from (remote hostname) field. The default as released is for the from field to not be printed, although your system administrator or distribution maintainer may have compiled a version in which the from field is shown by default.

-V -> Display version information.

-o -> Old style output. Prints blank space for idle times less than one minute.

user -> Show information about the specified user only.

Examples

praveen@praveen:~$ w
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
praveen  tty7     :0               06:38   48:04   1:37   0.29s gnome-session
praveen  pts/1    :0.0             07:26    0.00s  0.31s  0.00s w

With Regards,
S. Praveen

Day 89: $dmesg command

ODOC: About dmesg command

Print or control the kernel ring buffer. The program helps users to print out their bootup messages. Instead of copying the messages by hand and mail the boot.messages file to whoever can debug their problem.

Syntax

dmesg [ -c ] [ -n level ] [ -s bufsize ]

-c -> Clear the ring buffer contents after printing.

-sbufsize -> Use a buffer of size bufsize to query the kernel ring buffer. This is 16392 by default. (The default kernel syslog buffer size was 4096 at first, 8192 since 1.3.54, 16384 since 2.1.113.) If you have set the kernel buffer to be larger than the default then this option can be used to view the entire buffer.

-nlevel -> Set the level at which logging of messages is done to the console. For example, -n 1 prevents all messages, expect panic messages, from appearing on the console. All levels of messages are still written to /proc/kmsg, so syslogd(8) can still be used to control exactly where kernel messages appear. When the -n option is used, dmesg will not print or clear the kernel ring buffer.
When both options are used, only the last option on the command line will have an effect.

Example

praveen@praveen-desktop:~$dmesg

[    0.000000]   #37 [00017f6c80 - 00017f6c88]         BOOTMEM
[    0.000000]   #38 [00017f6cc0 - 00017f6cc8]         BOOTMEM
[    0.000000]   #39 [00017f6d00 - 00017f6da8]         BOOTMEM
[    0.000000]   #40 [00017f6dc0 - 00017f6e28]         BOOTMEM
[    0.000000]   #41 [00017f6e40 - 00017fae40]         BOOTMEM
[    0.000000]   #42 [000180e000 - 000188e000]         BOOTMEM
[    0.000000]   #43 [000188e000 - 00018ce000]         BOOTMEM
[    0.000000]   #44 [0001a0e000 - 0001f03d80]         BOOTMEM
[    0.000000] Initializing HighMem for node 0 (000377fe:0003f7f0)
[    0.000000] Memory: 1006352k/1040320k available (4928k kernel code, 33516k reserved, 2336k data, 684k init, 131016k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfff16000 - 0xfffff000   ( 932 kB)
[    0.000000]     pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
[    0.000000]     vmalloc : 0xf7ffe000 - 0xff7fe000   ( 120 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf77fe000   ( 887 MB)
[    0.000000]       .init : 0xc0819000 - 0xc08c4000   ( 684 kB)
[    0.000000]       .data : 0xc05d029e - 0xc0818668   (2336 kB)
[    0.000000]       .text : 0xc0100000 - 0xc05d029e   (4928 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=13, HWalign=128, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] 	RCU-based detection of stalled CPUs is disabled.
[    0.000000] 	Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:2304 nr_irqs:512
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 2400.252 MHz processor.
[    0.004010] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.50 BogoMIPS (lpj=9601008)
[    0.004018] pid_max: default: 32768 minimum: 301
[    0.004051] Security Framework initialized
[    0.004091] AppArmor: AppArmor initialized
[    0.004094] Yama: becoming mindful.
[    0.004190] Mount-cache hash table entries: 512
[    0.004448] Initializing cgroup subsys ns
[    0.004456] Initializing cgroup subsys cpuacct
[    0.004463] Initializing cgroup subsys memory
[    0.004479] Initializing cgroup subsys devices
[    0.004484] Initializing cgroup subsys freezer
[    0.004487] Initializing cgroup subsys net_cls
[    0.004537] CPU0: Hyper-Threading is disabled
[    0.004544] mce: CPU supports 4 MCE banks
[    0.004560] CPU0: Thermal monitoring enabled (TM1)
[    0.004579] Performance Events: Netburst events, Netburst P4/Xeon PMU driver.
[    0.004595] ... version:                0
[    0.004598] ... bit width:              40
[    0.004601] ... generic registers:      18
[    0.004605] ... value mask:             000000ffffffffff
[    0.004608] ... max period:             0000007fffffffff
[    0.004611] ... fixed-purpose events:   0
[    0.004614] ... event mask:             000000000003ffff
[    0.005897] SMP alternatives: switching to UP code
[    0.020376] ACPI: Core revision 20100428
[    0.027512] ftrace: converting mcount calls to 0f 1f 44 00 00
[    0.027522] ftrace: allocating 21758 entries in 43 pages
[    0.028126] Enabling APIC mode:  Flat.  Using 1 I/O APICs
[    0.028435] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.069098] CPU0: Intel(R) Pentium(R) 4 CPU 2.40GHz stepping 09
[    0.072000] Brought up 1 CPUs
[    0.072000] Total of 1 processors activated (4800.50 BogoMIPS).
[    0.072000] devtmpfs: initialized
[    0.072000] regulator: core version 0.5
[    0.072000] Time:  6:37:43  Date: 07/27/11
[    0.072000] NET: Registered protocol family 16
[    0.072000] EISA bus registered
[    0.072000] ACPI: bus type pci registered
[    0.095629] PCI: PCI BIOS revision 2.10 entry at 0xfa270, last bus=1
[    0.095633] PCI: Using configuration type 1 for base access
[    0.097032] bio: create slab  at 0
[    0.098052] ACPI: EC: Look up EC in DSDT
[    0.103437] ACPI: Interpreter enabled
[    0.103444] ACPI: (supports S0 S1 S4 S5)
[    0.103479] ACPI: Using IOAPIC for interrupt routing
[    0.109361] ACPI: No dock devices found.
[    0.109367] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.109526] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.109823] pci_root PNP0A03:00: host bridge window [io  0x0000-0x0cf7]
[    0.109828] pci_root PNP0A03:00: host bridge window [io  0x0d00-0xffff]
[    0.109832] pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
[    0.109836] pci_root PNP0A03:00: host bridge window [mem 0x000c0000-0x000dffff]
[    0.109840] pci_root PNP0A03:00: host bridge window [mem 0x3f800000-0xfebfffff]
[    0.109870] pci 0000:00:00.0: reg 10: [mem 0xe8000000-0xebffffff pref]
[    0.109948] pci 0000:00:02.0: reg 10: [mem 0xe0000000-0xe7ffffff pref]
[    0.109955] pci 0000:00:02.0: reg 14: [mem 0xec100000-0xec17ffff]
[    0.110069] pci 0000:00:1d.0: reg 20: [io  0xd900-0xd91f]
[    0.110127] pci 0000:00:1d.1: reg 20: [io  0xe000-0xe01f]
[    0.110185] pci 0000:00:1d.2: reg 20: [io  0xe200-0xe21f]
[    0.110242] pci 0000:00:1d.3: reg 20: [io  0xd800-0xd81f]
[    0.110295] pci 0000:00:1d.7: reg 10: [mem 0xec180000-0xec1803ff]
[    0.110351] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
[    0.110357] pci 0000:00:1d.7: PME# disabled
[    0.110451] pci 0000:00:1f.0: Force enabled HPET at 0xfed00000
[    0.110459] pci 0000:00:1f.0: quirk: [io  0x0400-0x047f] claimed by ICH4 ACPI/GPIO/TCO
[    0.110464] pci 0000:00:1f.0: quirk: [io  0x0480-0x04bf] claimed by ICH4 GPIO
[    0.110490] pci 0000:00:1f.2: reg 10: [io  0x0000-0x0007]
[    0.110497] pci 0000:00:1f.2: reg 14: [io  0x0000-0x0003]
[    0.110505] pci 0000:00:1f.2: reg 18: [io  0x0000-0x0007]
[    0.110512] pci 0000:00:1f.2: reg 1c: [io  0x0000-0x0003]
[    0.110520] pci 0000:00:1f.2: reg 20: [io  0xf000-0xf00f]
[    0.110577] pci 0000:00:1f.3: reg 20: [io  0x0500-0x051f]
[    0.110622] pci 0000:00:1f.5: reg 10: [io  0xd000-0xd0ff]
[    0.110630] pci 0000:00:1f.5: reg 14: [io  0xe100-0xe13f]
[    0.110637] pci 0000:00:1f.5: reg 18: [mem 0xec181000-0xec1811ff]
[    0.110645] pci 0000:00:1f.5: reg 1c: [mem 0xec182000-0xec1820ff]
[    0.110678] pci 0000:00:1f.5: PME# supported from D0 D3hot D3cold
[    0.110683] pci 0000:00:1f.5: PME# disabled
[    0.110731] pci 0000:01:01.0: reg 10: [io  0xc000-0xc0ff]
[    0.110739] pci 0000:01:01.0: reg 14: [mem 0xec000000-0xec0000ff]
[    0.110782] pci 0000:01:01.0: supports D1 D2
[    0.110785] pci 0000:01:01.0: PME# supported from D1 D2 D3hot D3cold
[    0.110790] pci 0000:01:01.0: PME# disabled
[    0.110835] pci 0000:00:1e.0: PCI bridge to [bus 01-01] (subtractive decode)
[    0.110841] pci 0000:00:1e.0:   bridge window [io  0xc000-0xcfff]
[    0.110847] pci 0000:00:1e.0:   bridge window [mem 0xec000000-0xec0fffff]
[    0.110853] pci 0000:00:1e.0:   bridge window [mem 0xfff00000-0x000fffff pref] (disabled)
[    0.110858] pci 0000:00:1e.0:   bridge window [io  0x0000-0x0cf7] (subtractive decode)
[    0.110862] pci 0000:00:1e.0:   bridge window [io  0x0d00-0xffff] (subtractive decode)
[    0.110866] pci 0000:00:1e.0:   bridge window [mem 0x000a0000-0x000bffff] (subtractive decode)
[    0.110870] pci 0000:00:1e.0:   bridge window [mem 0x000c0000-0x000dffff] (subtractive decode)
[    0.110874] pci 0000:00:1e.0:   bridge window [mem 0x3f800000-0xfebfffff] (subtractive decode)
[    0.110885] pci_bus 0000:00: on NUMA node 0
[    0.110891] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.111105] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
[    0.120093] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 9 10 11 *12 14 15)
[    0.120232] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 9 *10 11 12 14 15)
[    0.120368] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 9 10 *11 12 14 15)
[    0.120507] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 *9 10 11 12 14 15)
[    0.120644] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
[    0.120781] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
[    0.120919] ACPI: PCI Interrupt Link [LNK0] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
[    0.121056] ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 *5 7 9 10 11 12 14 15)
[    0.121118] HEST: Table is not found!
[    0.121241] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.121251] vgaarb: loaded
[    0.121529] SCSI subsystem initialized
[    0.121637] libata version 3.00 loaded.
[    0.121723] usbcore: registered new interface driver usbfs
[    0.121743] usbcore: registered new interface driver hub
[    0.121781] usbcore: registered new device driver usb
[    0.121987] ACPI: WMI: Mapper loaded
[    0.121991] PCI: Using ACPI for IRQ routing
[    0.121997] PCI: pci_cache_line_size set to 64 bytes
[    0.122061] reserve RAM buffer: 000000000009f800 - 000000000009ffff 
[    0.122065] reserve RAM buffer: 000000003f7f0000 - 000000003fffffff 
[    0.122218] NetLabel: Initializing
[    0.122221] NetLabel:  domain hash size = 128
[    0.122224] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.122242] NetLabel:  unlabeled traffic allowed by default
[    0.122404] hpet clockevent registered
[    0.122410] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.122418] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.122425] hpet0: 3 comparators, 64-bit 14.318180 MHz counter
[    0.128028] Switching to clocksource tsc
[    0.144445] AppArmor: AppArmor Filesystem Enabled
[    0.144479] pnp: PnP ACPI init
[    0.144523] ACPI: bus type pnp registered
[    0.148350] pnp: PnP ACPI: found 13 devices
[    0.148354] ACPI: ACPI bus type pnp unregistered
[    0.148360] PnPBIOS: Disabled by ACPI PNP
[    0.148386] system 00:01: [io  0x04d0-0x04d1] has been reserved
[    0.148398] system 00:0a: [io  0x0400-0x04bf] could not be reserved
[    0.148408] system 00:0c: [mem 0x000cc000-0x000cffff] has been reserved
[    0.148412] system 00:0c: [mem 0x000d5000-0x000d7fff] has been reserved
[    0.148417] system 00:0c: [mem 0x000f0000-0x000fbfff] could not be reserved
[    0.148421] system 00:0c: [mem 0x000fc000-0x000fffff] could not be reserved
[    0.148425] system 00:0c: [mem 0x3f7f0000-0x3f7fffff] could not be reserved
[    0.148429] system 00:0c: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.148434] system 00:0c: [mem 0x00100000-0x3f7effff] could not be reserved
[    0.148438] system 00:0c: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.148442] system 00:0c: [mem 0xfec01000-0xfed8ffff] has been reserved
[    0.148446] system 00:0c: [mem 0xfee00000-0xfee00fff] has been reserved
[    0.148450] system 00:0c: [mem 0xffb00000-0xffb7ffff] has been reserved
[    0.148454] system 00:0c: [mem 0xfff00000-0xffffffff] has been reserved
[    0.148458] system 00:0c: [mem 0x000e0000-0x000effff] has been reserved
[    0.185353] pci 0000:00:1e.0: PCI bridge to [bus 01-01]
[    0.185360] pci 0000:00:1e.0:   bridge window [io  0xc000-0xcfff]
[    0.185368] pci 0000:00:1e.0:   bridge window [mem 0xec000000-0xec0fffff]
[    0.185373] pci 0000:00:1e.0:   bridge window [mem pref disabled]
[    0.185391] pci 0000:00:1e.0: setting latency timer to 64
[    0.185397] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    0.185401] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    0.185404] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    0.185408] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000dffff]
[    0.185411] pci_bus 0000:00: resource 8 [mem 0x3f800000-0xfebfffff]
[    0.185415] pci_bus 0000:01: resource 0 [io  0xc000-0xcfff]
[    0.185418] pci_bus 0000:01: resource 1 [mem 0xec000000-0xec0fffff]
[    0.185422] pci_bus 0000:01: resource 4 [io  0x0000-0x0cf7]
[    0.185425] pci_bus 0000:01: resource 5 [io  0x0d00-0xffff]
[    0.185429] pci_bus 0000:01: resource 6 [mem 0x000a0000-0x000bffff]
[    0.185432] pci_bus 0000:01: resource 7 [mem 0x000c0000-0x000dffff]
[    0.185436] pci_bus 0000:01: resource 8 [mem 0x3f800000-0xfebfffff]
[    0.185502] NET: Registered protocol family 2
[    0.185600] IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.186072] TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.187477] TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
[    0.188403] TCP: Hash tables configured (established 131072 bind 65536)
[    0.188409] TCP reno registered
[    0.188423] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.188454] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.188659] NET: Registered protocol family 1
[    0.188691] pci 0000:00:02.0: Boot video device
[    0.188813] PCI: CLS 0 bytes, default 64
[    0.189127] cpufreq-nforce2: No nForce2 chipset.
[    0.189171] Scanning for low memory corruption every 60 seconds
[    0.189331] audit: initializing netlink socket (disabled)
[    0.189351] type=2000 audit(1311748663.184:1): initialized
[    0.199992] Trying to unpack rootfs image as initramfs...
[    0.212733] highmem bounce pool size: 64 pages
[    0.212744] HugeTLB registered 4 MB page size, pre-allocated 0 pages
[    0.218600] VFS: Disk quotas dquot_6.5.2
[    0.218694] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.224185] fuse init (API version 7.14)
[    0.224375] msgmni has been set to 1709
[    0.232898] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.232905] io scheduler noop registered
[    0.232908] io scheduler deadline registered
[    0.232928] io scheduler cfq registered (default)
[    0.233109] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.233144] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[    0.233430] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    0.233440] ACPI: Power Button [PWRB]
[    0.233518] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[    0.233524] ACPI: Power Button [PWRF]
[    0.233768] ACPI: acpi_idle registered with cpuidle
[    0.236094] ERST: Table is not found!
[    0.236367] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.236485] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.236593] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    0.236976] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.237127] 00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    0.238885] brd: module loaded
[    0.239676] loop: module loaded
[    0.244169] isapnp: Scanning for PnP cards...
[    0.249759] ata_piix 0000:00:1f.2: version 2.13
[    0.249787]   alloc irq_desc for 18 on node -1
[    0.249790]   alloc kstat_irqs on node -1
[    0.249802] ata_piix 0000:00:1f.2: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[    0.249809] ata_piix 0000:00:1f.2: MAP [ IDE IDE P0 P1 ]
[    0.249885] ata_piix 0000:00:1f.2: setting latency timer to 64
[    0.256446] scsi0 : ata_piix
[    0.300239] scsi1 : ata_piix
[    0.301386] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0xf000 irq 14
[    0.301391] ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xf008 irq 15
[    0.302005] Fixed MDIO Bus: probed
[    0.302063] PPP generic driver version 2.4.2
[    0.302176] tun: Universal TUN/TAP device driver, 1.6
[    0.302179] tun: (C) 1999-2004 Max Krasnyansky 
[    0.302302] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.302340]   alloc irq_desc for 23 on node -1
[    0.302344]   alloc kstat_irqs on node -1
[    0.302355] ehci_hcd 0000:00:1d.7: PCI INT D -> GSI 23 (level, low) -> IRQ 23
[    0.302379] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[    0.302384] ehci_hcd 0000:00:1d.7: EHCI Host Controller
[    0.302438] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
[    0.306362] ehci_hcd 0000:00:1d.7: cache line size of 64 is not supported
[    0.312124] ehci_hcd 0000:00:1d.7: irq 23, io mem 0xec180000
[    0.328181] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[    0.328450] hub 1-0:1.0: USB hub found
[    0.328458] hub 1-0:1.0: 8 ports detected
[    0.328578] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.328603] uhci_hcd: USB Universal Host Controller Interface driver
[    0.328678]   alloc irq_desc for 16 on node -1
[    0.328682]   alloc kstat_irqs on node -1
[    0.328693] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.328705] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[    0.328709] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[    0.328778] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
[    0.328825] uhci_hcd 0000:00:1d.0: irq 16, io base 0x0000d900
[    0.329009] hub 2-0:1.0: USB hub found
[    0.329017] hub 2-0:1.0: 2 ports detected
[    0.329091]   alloc irq_desc for 19 on node -1
[    0.329095]   alloc kstat_irqs on node -1
[    0.329101] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[    0.329109] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[    0.329113] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[    0.329173] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
[    0.329209] uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000e000
[    0.329384] hub 3-0:1.0: USB hub found
[    0.329390] hub 3-0:1.0: 2 ports detected
[    0.329464] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[    0.329473] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[    0.329477] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[    0.329533] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
[    0.329574] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000e200
[    0.329762] hub 4-0:1.0: USB hub found
[    0.329769] hub 4-0:1.0: 2 ports detected
[    0.329837] uhci_hcd 0000:00:1d.3: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    0.329846] uhci_hcd 0000:00:1d.3: setting latency timer to 64
[    0.329851] uhci_hcd 0000:00:1d.3: UHCI Host Controller
[    0.329901] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
[    0.329927] uhci_hcd 0000:00:1d.3: irq 16, io base 0x0000d800
[    0.330124] hub 5-0:1.0: USB hub found
[    0.330130] hub 5-0:1.0: 2 ports detected
[    0.330294] PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
[    0.330299] PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[    0.331012] serio: i8042 KBD port at 0x60,0x64 irq 1
[    0.331160] mice: PS/2 mouse device common for all mice
[    0.331339] rtc_cmos 00:03: RTC can wake from S4
[    0.331398] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[    0.331428] rtc0: alarms up to one month, 242 bytes nvram, hpet irqs
[    0.331610] device-mapper: uevent: version 1.0.3
[    0.335276] device-mapper: ioctl: 4.17.0-ioctl (2010-03-05) initialised: dm-devel@redhat.com
[    0.339552] device-mapper: multipath: version 1.1.1 loaded
[    0.339559] device-mapper: multipath round-robin: version 1.0.0 loaded
[    0.341866] EISA: Probing bus 0 at eisa.0
[    0.341876] EISA: Cannot allocate resource for mainboard
[    0.341879] Cannot allocate resource for EISA slot 1
[    0.341882] Cannot allocate resource for EISA slot 2
[    0.341885] Cannot allocate resource for EISA slot 3
[    0.341888] Cannot allocate resource for EISA slot 4
[    0.341890] Cannot allocate resource for EISA slot 5
[    0.341893] Cannot allocate resource for EISA slot 6
[    0.341896] Cannot allocate resource for EISA slot 7
[    0.341899] Cannot allocate resource for EISA slot 8
[    0.341901] EISA: Detected 0 cards.
[    0.346335] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
[    0.346460] cpuidle: using governor ladder
[    0.346464] cpuidle: using governor menu
[    0.346923] TCP cubic registered
[    0.347124] NET: Registered protocol family 10
[    0.347609] lo: Disabled Privacy Extensions
[    0.347902] NET: Registered protocol family 17
[    0.348019] Using IPI No-Shortcut mode
[    0.348167] PM: Resume from disk failed.
[    0.348185] registered taskstats version 1
[    0.348391]   Magic number: 3:251:621
[    0.348501] rtc_cmos 00:03: setting system clock to 2011-07-27 06:37:44 UTC (1311748664)
[    0.348506] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    0.348508] EDD information not available.
[    0.512190] ata2.01: ATAPI: HL-DT-ST DVDRAM GH24NS70, GN00, max UDMA/100
[    0.528234] ata2.01: configured for UDMA/100
[    0.680695] ata1.01: ATA-6: ST380011A, 8.01, max UDMA/100
[    0.680702] ata1.01: 156301488 sectors, multi 16: LBA48 
[    0.697306] ata1.01: configured for UDMA/100
[    0.939647] isapnp: No Plug & Play device found
[    0.939686] usb 3-2: new low speed USB device using uhci_hcd and address 2
[    0.939900] scsi 0:0:1:0: Direct-Access     ATA      ST380011A        8.01 PQ: 0 ANSI: 5
[    0.940201] sd 0:0:1:0: Attached scsi generic sg0 type 0
[    0.940420] sd 0:0:1:0: [sda] 156301488 512-byte logical blocks: (80.0 GB/74.5 GiB)
[    0.940502] sd 0:0:1:0: [sda] Write Protect is off
[    0.940506] sd 0:0:1:0: [sda] Mode Sense: 00 3a 00 00
[    0.940542] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.940776]  sda:
[    0.943609] scsi 1:0:1:0: CD-ROM            HL-DT-ST DVDRAM GH24NS70  GN00 PQ: 0 ANSI: 5
[    0.952362]  sda1 sda2 
[    1.002758] sd 0:0:1:0: [sda] Attached SCSI disk
[    1.010591] Freeing initrd memory: 10512k freed
[    1.030725] Freeing unused kernel memory: 684k freed
[    1.031982] Write protecting the kernel text: 4932k
[    1.032022] Write protecting the kernel read-only data: 1976k
[    1.066145] udev[67]: starting version 163
[    1.471633] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
[    1.471667] 8139cp 0000:01:01.0: This (id 10ec:8139 rev 10) is not an 8139C+ compatible chip, use 8139too
[    1.480489] usbcore: registered new interface driver hiddev
[    1.481880] 8139too: 8139too Fast Ethernet driver 0.9.28
[    1.481939]   alloc irq_desc for 17 on node -1
[    1.481943]   alloc kstat_irqs on node -1
[    1.481954] 8139too 0000:01:01.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[    1.483221] 8139too 0000:01:01.0: eth0: RealTek RTL8139 at 0xc000, 00:e0:4c:15:ef:27, IRQ 17
[    1.495190] input:  USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/input/input3
[    1.495521] generic-usb 0003:15D9:0A4C.0001: input,hidraw0: USB HID v1.11 Mouse [ USB OPTICAL MOUSE] on usb-0000:00:1d.1-2/input0
[    1.495837] usbcore: registered new interface driver usbhid
[    1.495842] usbhid: USB HID core driver
[    2.254896] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
[   11.268026] usb 1-6: new high speed USB device using ehci_hcd and address 3
[   13.339007] Adding 1951740k swap on /dev/sda1.  Priority:-1 extents:1 across:1951740k 
[   13.429857] udev[282]: starting version 163
[   13.509791] EXT4-fs (sda6): re-mounted. Opts: errors=remount-ro
[   13.579571] lp: driver loaded but no devices found
[   13.697078] intel_rng: FWH not detected
[   13.771882] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[   14.018329] Linux agpgart interface v0.103
[   14.285779] agpgart-intel 0000:00:00.0: Intel 830M Chipset
[   14.286104] agpgart-intel 0000:00:00.0: detected 8060K stolen memory
[   14.353059] agpgart-intel 0000:00:00.0: AGP aperture is 128M @ 0xe0000000
[   14.448094] parport_pc 00:08: reported by Plug and Play ACPI
[   14.448142] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[   14.504679] Initializing USB Mass Storage driver...
[   14.542215] lp0: using parport0 (interrupt-driven).
[   14.572402] scsi2 : usb-storage 1-6:1.0
[   14.688953] ppdev: user-space parallel port driver
[   14.700053] scsi3 : usb-storage 1-6:1.1
[   14.718774] usbcore: registered new interface driver usb-storage
[   14.718781] USB Mass Storage support registered.
[   14.788407] type=1400 audit(1311728878.937:2): apparmor="STATUS" operation="profile_load" name="/sbin/dhclient3" pid=906 comm="apparmor_parser"
[   14.789110] type=1400 audit(1311728878.937:3): apparmor="STATUS" operation="profile_load" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=906 comm="apparmor_parser"
[   14.789502] type=1400 audit(1311728878.937:4): apparmor="STATUS" operation="profile_load" name="/usr/lib/connman/scripts/dhclient-script" pid=906 comm="apparmor_parser"
[   14.821543] [drm] Initialized drm 1.1.0 20060810
[   15.039263] i915 0000:00:02.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[   15.039273] i915 0000:00:02.0: setting latency timer to 64
[   15.167266] [drm] set up 15M of stolen space
[   15.287048] type=1400 audit(1311728879.433:5): apparmor="STATUS" operation="profile_load" name="/usr/share/gdm/guest-session/Xsession" pid=1050 comm="apparmor_parser"
[   15.289429] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   15.289867] [drm] initialized overlay support
[   15.294802] type=1400 audit(1311728879.441:6): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient3" pid=1052 comm="apparmor_parser"
[   15.295513] type=1400 audit(1311728879.441:7): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=1052 comm="apparmor_parser"
[   15.295905] type=1400 audit(1311728879.441:8): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=1052 comm="apparmor_parser"
[   15.311612] type=1400 audit(1311728879.457:9): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince" pid=1055 comm="apparmor_parser"
[   15.435386] type=1400 audit(1311728879.581:10): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince-previewer" pid=1055 comm="apparmor_parser"
[   15.445635] type=1400 audit(1311728879.593:11): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince-thumbnailer" pid=1055 comm="apparmor_parser"
[   15.659537] scsi 2:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   15.663372] usb 1-6: USB disconnect, address 3
[   15.669920] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[   15.699084] Console: switching to colour frame buffer device 100x37
[   15.701360] fb0: inteldrmfb frame buffer device
[   15.701363] drm: registered panic notifier
[   15.715553] Slow work thread pool: Starting up
[   15.729012] Slow work thread pool: Ready
[   15.729040] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[   15.729341] Intel ICH 0000:00:1f.5: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[   15.729383] Intel ICH 0000:00:1f.5: setting latency timer to 64
[   16.084032] intel8x0_measure_ac97_clock: measured 54804 usecs (2641 samples)
[   16.084038] intel8x0: clocking to 48000
[   19.243563] EXT4-fs (sda6): re-mounted. Opts: errors=remount-ro,commit=0
[   22.204090] usb 1-6: new high speed USB device using ehci_hcd and address 4
[   22.405331] scsi8 : usb-storage 1-6:1.4
[   22.432065] scsi9 : usb-storage 1-6:1.5
[   23.033617] usbcore: registered new interface driver usbserial
[   23.033661] USB Serial support registered for generic
[   23.034188] usbcore: registered new interface driver usbserial_generic
[   23.034194] usbserial: USB Serial Driver core
[   23.088341] USB Serial support registered for GSM modem (1-port)
[   23.089061] option 1-6:1.0: GSM modem (1-port) converter detected
[   23.090290] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB0
[   23.090325] option 1-6:1.1: GSM modem (1-port) converter detected
[   23.093757] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB1
[   23.093796] option 1-6:1.2: GSM modem (1-port) converter detected
[   23.094971] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB2
[   23.095007] option 1-6:1.3: GSM modem (1-port) converter detected
[   23.096710] usb 1-6: GSM modem (1-port) converter now attached to ttyUSB3
[   23.097097] usbcore: registered new interface driver option
[   23.097103] option: v0.7.2:USB Driver for GSM modems
[   23.419431] scsi 8:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   23.435801] scsi 9:0:0:0: Direct-Access     HUAWEI   MMC Storage      2.31 PQ: 0 ANSI: 2
[   23.441155] sr1: scsi-1 drive
[   23.441376] sr 8:0:0:0: Attached scsi CD-ROM sr1
[   23.441502] sr 8:0:0:0: Attached scsi generic sg2 type 5
[   23.447241] sd 9:0:0:0: Attached scsi generic sg3 type 0
[   23.466024] sd 9:0:0:0: [sdb] Attached SCSI removable disk
[   23.978135] EXT4-fs (sda6): re-mounted. Opts: errors=remount-ro,commit=0
[  232.438874] lo: Disabled Privacy Extensions
[  513.695948] lo: Disabled Privacy Extensions
[  728.335863] lo: Disabled Privacy Extensions

dmesg > boot.messages

It Send the kernel ring buffer to the boot.messages file, which could then be sent to another person.

With Regards,
S. Praveen

Day 88: $cmp command

ODOC: About cmp command

Compares two files and tells you what line numbers are different.

Syntax

cmp [-c] [-i N] [-l] [-s] [-v] firstfile secondfile

-c -> Output differing bytes as characters.

-i N -> Ignore differences in the first N bytes of input.

-l -> Write the byte number (decimal) and the differing bytes (octal) for each difference.

-s -> Write nothing for differing files; return exit statuses only.

-v -> Output version info.

firstfile -> First file that you wish to compare.

secondfile -> Second file that you wish to compare to.

Examples

praveen@praveen-desktop:~$cmp file1.txt file2.txt

Compares file1 to file2 and outputs results. Below is example of how these results may look.

praveen@praveen-desktop:~$file.txt file2.txt differ: char 1011, line 112

With Regards,
S. Praveen

Day 87: $whoami command

ODOC: About whoami command

Print effective userid.

Syntax
whoami

Would display the name of the current userid. For example, may list root if you’re logged in as root.

Example

praveen@praveen-desktop:~$ whoami
praveen

With Regards,
S. Praveen

Day 86: $break command

ODOC: About break command

Shell built-in functions to escape from or advance within a controlling while, for, foreach or until loop.

Syntax
break [n]
continue [n]

n -> The number of the break. The default number is 1.

Examples

break – within a script or while in any of the above processes would escape out of that process or script. Must actually be in a processes before being able to break from it.

With Regards,
S. Praveen

Day 85: $kill command

ODOC: About kill command

The kill command can Cancels a job.

Syntax

kill [-s] [-l] %pid

-s -> Specify the signal to send, using one of the symbolic names defined in the description. Values of signal will be recognized in a case independent fashion, without the SIG prefix. In addition, the symbolic name 0 will be recognized, representing the signal value zero. The corresponding signal will be sent instead of SIGTERM.

-l -> Write all values of signal sup ported by the implementation, if no operand is given. If an exit_status operand is given and it is a value of the ? shell special parameter and wait corresponding to a process that was ter minated by a signal, the signal corresponding to the signal that terminated the process will be written. If an exit_status operand is given and it is the unsigned decimal integer value of a signal number, the signal corresponding to that signal will be written. Otherwise, the results are unspecified.

pid -> One of the following:

1. A decimal integer specifying a process or process group to be signaled. The process or processes selected by positive, negative and zero values of the pid operand will be as
described for the kill function. If process number 0 is specified, all processes in the process group are signaled. If the first pid operand is negative, it should be preceded by — to keep it from being interpreted as an option.

2. A job control job ID that identifies a background process group to be signaled. The job control job ID notation is applicable only for invocations of kill in the current shell execution environment.

Note the job control job ID pid is available only on systems supporting the job control option.

Examples

praveen@praveen-desktop:~$ kill -s kill 100 -165

Kills job 1 of uid 165

When running the kill command you may receive the error “Operation not permitted”, this is often encountered when you’re killing the wrong group id (often 1,2,3 or low number jobs) that you don’t have permission to kill. If you wish to see the group id of the background task run jobs -l

With Regards,
S. Praveen

Day 84: $more command

ODOC: About more command

Displays text one screen at a time.

The more command in Linux is helpful when dealing with a small xterm window, or if you want to easily read a file without using an editor to do so. More is a filter for paging through text one screenful at a time.

Syntax

more [-c] [-d] [-e] [-f] [-i] [-l] [-n number] [-p command] [-r] [-s] [-t tagstring] [-u] [-w] [ -lines ] [ + linenumber ] [ +/ pattern ] [ file … ]

-c -> Clear before displaying. Redraws the screen instead of scrolling for faster displays. This option is ignored if the terminal does not have the ability to clear to the end of a line.

-d -> Display error messages rather than ringing the terminal bell if an unrecognized command is used. This is helpful for inexperienced users.

-e -> Exit immediately after writing the last line of the last file in the argument list.

-f -> Do not fold long lines. This is useful when lines contain nonprinting characters or escape
sequences, such as those generated when nroff output is piped through ul.

-i -> Perform pattern matching in searches without regard to case.

-l -> Ignores form-feed characters (Ctrl + L starts the new page.)

-n number -> Specify the number of lines per screenful. The number argument is a positive decimal integer. The -n option overrides any values obtained from the environment.

-p command -> For each file examined, initially execute the more command in the command argument. If the command is a positioning command, such as a line number or a regular expression search, set the current position to represent the final results of the command, without writing any intermediate lines of the file.

-r -> Displays control keys.

-s -> Doesn’t display extra blank lines.

-t tagstring -> Write the screenful of the file containing the tag named by the tagstring argument.

-u -> Ignores backspace and underscores.

-w -> Normally, more exits when it comes to the end of its input. With -w, however, more prompts and waits for any key to be struck before exiting.

-lines -> Display the indicated number of lines in each screenful, rather than the default (the number of lines in the terminal screen less two).

+linenumber -> Start up at linenumber

+/pattern -> Displays text two lines before the first time text appears.

filename -> The name of the file.

Examples

praveen@praveen-desktop:~$ _
praveen@praveen-desktop:~$ myfile.txt

This will auto clear the screen and display the start of the file.

#!/bin/bash 
beep 659 120  #  Treble E
beep 0 120
beep 622 120  #  Treble D#
beep 0 120
--More--(5%)   <---- This line shows at what line you have reached in the file relative to the entire file size.

If you press space, then more will move down the file the height of the terminal window you have open, to display new information to you.

With Regards,
S. Praveen