A UNIX Command $bsd-write jeffrin 8 bsd-write: jeffrin is not logged in on 8 $bsd-write jeffrin tty8 bsd-write: jeffrin has messages disabled on tty8 $mesg y $bsd-write jeffrin tty8 bsd-write: jeffrin has messages disabled on tty8 $w 20:08:58 up 23 min, 3 users, load average: 0.02, 0.15, 0.16 USER TTY FROM LOGIN@ IDLE JCPU PCPU …
Category Archives: Uncategorized
skill, snice – send a signal or report process status
A UNIX Command $skill Usage: skill [signal to send] [options] process selection criteria Example: skill -KILL -v pts/* The default signal is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -SIGKILL -KILL -9 General options: …
Continue reading “skill, snice – send a signal or report process status”
parameter tcp_retries1
A UNIX Parameter $cat /proc/sys/net/ipv4/tcp_retries1 3 $echo 4 > /proc/sys/net/ipv4/tcp_r Parameter Definition This value influences the time, after which TCP decides, that something is wrong due to unacknowledged RTO retransmissions, and reports this suspicion to the network layer. RFC 1122 recommends at least 3 retransmissions, which is the default. Parameter Code Internals snippet 1 { …
hcitool – configure Bluetooth connections
A UNIX Command $hcitool hcitool – HCI Tool ver 4.89 Usage: hcitool [options] [command parameters] Options: –help Display help -i dev HCI device Commands: dev Display local devices inq Inquire remote devices scan Scan for remote devices name Get name from remote device info Get information from remote device spinq Start periodic inquiry epinq Exit …
Continue reading “hcitool – configure Bluetooth connections”
basename – strip directory and suffix from filenames
A UNIX Command $basename basename: missing operand Try `basename –help’ for more information. $basename /usr/bin/ bin $basename /usr/ usr $ $basename /usr/bin/less less $basename /usr/include/ma malloc.h math.h $basename /usr/include/math.h math.h $basename /usr/include/math.h . math.h $basename /usr/include/math.h .h math $basename /usr/lib/libgccpp.so.1 libgccpp.so.1 $basename /usr/lib/libgccpp.so.1 .1 libgccpp.so $ UNIX Explanation `basename’ removes any leading directory components from …
Continue reading “basename – strip directory and suffix from filenames”
grog – guess options for groff command
A UNIX Command $groff /usr/share/man/man7/pipe.7 | more %!PS-Adobe-3.0 %%Creator: groff version 1.21 %%CreationDate: Fri Jul 15 18:18:46 2011 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.21 0 %%Pages: 1 %%PageOrder: Ascend %%DocumentMedia: Default 595 842 0 () () %%Orientation: Portrait %%EndComments %%BeginDefaults %%PageMedia: Default %%EndDefaults %%BeginProlog %%BeginResource: procset grops 1.21 …
pmap – report memory map of a process
A UNIX Command $pmap 2307 | more 2307: bash 0000000000400000 868K r-x– /bin/bash 00000000006d9000 36K rw— /bin/bash 00000000006e2000 24K rw— [ anon ] 00000000010b9000 304K rw— [ anon ] 00007f1e4c89b000 44K r-x– /lib/libnss_files-2.13.so 00007f1e4c8a6000 2044K —– /lib/libnss_files-2.13.so 00007f1e4caa5000 4K r—- /lib/libnss_files-2.13.so 00007f1e4caa6000 4K rw— /lib/libnss_files-2.13.so 00007f1e4caa7000 40K r-x– /lib/libnss_nis-2.13.so 00007f1e4cab1000 2044K —– /lib/libnss_nis-2.13.so 00007f1e4ccb0000 4K …
logname – print user´s login name
A UNIX Command $logname jeffrin $logname –help Usage: logname [OPTION] Print the name of the current user. –help display this help and exit –version output version information and exit Report logname bugs to bug-coreutils@gnu.org GNU coreutils home page: General help using GNU software: For complete documentation, run: info coreutils ‘logname invocation’ $logname –version logname (GNU …
csplit – split a file into sections determined by context lines
A UNIX Command $cat test.text hello how are you ? $csplit test.text 1 0 20 $cat xx00 $cat xx01 hello how are you ? $rm xx* $csplit test.text 2 6 14 $cat xx00 hello $cat xx01 how are you ? $rm xx* $csplit test.text 3 10 10 $cat xx01 are you ? $cat xx00 hello …
Continue reading “csplit – split a file into sections determined by context lines”
truncate – shrink or extend the size of a file to the specified size
A UNIX Command $cat example.text hello $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 6 Jun 21 02:32 example.text $truncate -s 10 example.text $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 10 Jun 21 02:35 example.text $hexdump example.text 0000000 6568 6c6c 0a6f 0000 0000 000000a $cat example.text hello $truncate -s 9 example.text $ls -l example.text -rw-r–r– 1 …
Continue reading “truncate – shrink or extend the size of a file to the specified size”