coproc is a shell keyword related to coprocesses in GNU Bash

ABOUT coproc Bash 4.0 introduced coprocesses, a feature certainly familiar to ksh users. The coproc keyword starts a command as a background job, setting up pipes connected to both its stdin and stdout so that you can interact with it bidirectionally. Optionally, the co-process can have a name NAME. If NAME is given, the command …

How does bracket expression and negation [^ ] work with grep ?

commandline session $ 4.2.20 19 519—> grep ‘[^b ]sort’ worked Heapsort Quicksort Timsort $ 4.2.20 20 520—> cat worked Bubble sort Selection sort Insertion sort Shell sort Comb sort Merge sort Heapsort Quicksort Counting sort Bucket sort Radix sort Distribution sort Timsort $ 4.2.20 21 521—>

A look into ls ( –block-size option ) in GNU

ABOUT ls –block-size with -l, scale sizes by SIZE when printing them; e.g., ‘–block-size=M’ [bash light=”true”] $ls info man $ls -l total 8 drwxr-xr-x 2 jeffrin jeffrin 4096 Nov 22 20:39 info drwxr-xr-x 3 jeffrin jeffrin 4096 Nov 22 18:51 man $ls -l –block-size=B ls: invalid –block-size argument `B’ $ls -l –block-size=KB total 9kB drwxr-xr-x …

Hacking with ls options ( -S -1 -r)

GNU Command $> a1.txt $a > a2.txt bash: a: command not found $echo a > a2.txt $ls -S a2.txt a1.txt $ls -S -1 a2.txt a1.txt $ls -r -S -1 a1.txt a2.txt $ UNIX Explanation -S sort by file size -1 list one file per line -r, –reverse reverse order while sorting computer science Theory Drop …

What is sysctl in some Unix-like Operating systems ?

ABOUT sysctl sysctl is a software utility of some Unix-like operating systems that reads and modifies the attributes of the system kernel such as its version number, maximum limits, and security settings. It is available both as a system call for compiled programs, and an administrator command for interactive use and scripting. Linux additionally exposes …

What is a tracepoint ?

Topic Tracepoint Explanation A tracepoint placed in code provides a hook to call a function (probe) that you can provide at runtime. A tracepoint can be “on” (a probe is connected to it) or “off” (no probe is attached). When a tracepoint is “off” it has no effect, except for adding a tiny time penalty …

hung_task_timeout_secs ( modifying system parameters under /proc/sys file tree)

Linux Parameter $cat /proc/sys/kernel/hung_task_timeout_secs 120 $ Parameter Related TEST-MAIL1 ~ #dmesg [cut] “echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message. rm D ffff88107f472c40 0 16705 22512 0x00000000 ffff881014693810 0000000000000086 ffff881000000000 ffff88102013b040 0000000000012c40 ffff880471855fd8 0000000000012c40 ffff880471854010 ffff880471855fd8 0000000000012c40 ffff881017ff8e40 0000000100000000 Call Trace: [] ? schedule_timeout+0x1ed/0x2d0 [] ? dlmlock+0x8a/0xda0 [ocfs2_dlm] [] ? wait_for_common+0x12c/0x1a0 [] ? try_to_wake_up+0x280/0x280 [] ? …

-S option . listing directory contents sorted by file size

GNU command $ls -l -Gg total 124 -rwxr-xr-x 1 54161 Dec 12 18:32 bp -rw-r–r– 1 8917 Sep 22 2006 cfg.c -rw-r–r– 1 1638 Sep 22 2006 cfg.h drwxr-xr-x 2 4096 Oct 26 17:43 CVS drwxr-xr-x 3 4096 Oct 26 00:48 gtk -rw-r–r– 1 104 Oct 26 00:49 Makefile -rw-r–r– 1 718 Dec 12 18:33 …

ls (-t option) sort by modification time

GNU command $ls -l total 40 drwxr-xr-x 3 jeffrin jeffrin 4096 Aug 18 20:16 beautifulwork drwxr-xr-x 5 jeffrin jeffrin 4096 Aug 18 20:16 books drwxr-xr-x 2 jeffrin jeffrin 4096 Aug 18 20:16 bugs-general drwxr-xr-x 2 jeffrin jeffrin 4096 Oct 13 20:27 config-files drwxr-xr-x 3 jeffrin jeffrin 4096 Aug 24 22:03 debian-howtos drwxr-xr-x 2 jeffrin jeffrin …

vm_insert_page – insert single page into user vma

1. vm_insert_page – insert single page into user vma int vm_insert_page(struct vm_area_struct * vma, unsigned long addr, struct page * page); vma user vma to map to addr target user address of this page page source kernel page 2. Classroom The virtual memory area (VMA) is the kernel data structure used to manage distinct regions …