$sort -t: -k3 --debug /etc/passwd
sort: using ‘en_US.UTF-8’ sorting rules
root:x:0:0:root:/root:/bin/bash
________________________
_______________________________
jeffrin:x:1000:1000:Jeffrin Jose T,,,:/home/jeffrin:/bin/bash
___________________________________________________
_____________________________________________________________
uuidd:x:100:101::/run/uuidd:/bin/false
______________________________
______________________________________
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
____________________________________________
___________________________________________________
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
____________________________________
__________________________________________________
statd:x:102:65534::/var/lib/nfs:/bin/false
__________________________________
__________________________________________
sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin
__________________________________________
_________________________________________________
messagebus:x:104:106::/var/run/dbus:/bin/false
_________________________________
______________________________________________
colord:x:105:109:colord colour management daemon,,,:/var/lib/colord:/bin/false
_____________________________________________________________________
______________________________________________________________________________
usbmux:x:106:46:usbmux daemon,,,:/home/usbmux:/bin/false
_______________________________________________
________________________________________________________
avahi:x:107:113:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
_____________________________________________________________
_____________________________________________________________________
pulse:x:108:114:PulseAudio daemon,,,:/var/run/pulse:/bin/false
______________________________________________________
______________________________________________________________
speech-dispatcher:x:109:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
______________________________________________________________
__________________________________________________________________________________
rtkit:x:110:116:RealtimeKit,,,:/proc:/bin/false
_______________________________________
_______________________________________________
Debian-gdm:x:111:117:Gnome Display Manager:/var/lib/gdm3:/bin/false
______________________________________________________
___________________________________________________________________
saned:x:112:118::/var/lib/saned:/bin/false
__________________________________
__________________________________________
ntp:x:113:120::/home/ntp:/bin/false
_____________________________
___________________________________
geoclue:x:114:121::/var/lib/geoclue:/bin/false
____________________________________
______________________________________________
dnsmasq:x:115:65534:dnsmasq,,,:/var/lib/misc:/bin/false
_____________________________________________
_______________________________________________________
fetchmail:x:116:65534::/var/lib/fetchmail:/bin/false
________________________________________
____________________________________________________
vde2-net:x:117:123::/var/run/vde2:/bin/false
_________________________________
____________________________________________
timidity:x:118:125:TiMidity++ MIDI sequencer service:/etc/timidity:/bin/false
__________________________________________________________________
_____________________________________________________________________________
epmd:x:119:128::/var/run/epmd:/bin/false
_________________________________
________________________________________
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
______________________________________
_______________________________________________
systemd-timesync:x:120:129:systemd Time Synchronization,,,:/run/systemd:/bin/false
_______________________________________________________________
__________________________________________________________________________________
systemd-network:x:121:130:systemd Network Management,,,:/run/systemd/netif:/bin/false
___________________________________________________________________
_____________________________________________________________________________________
systemd-resolve:x:122:131:systemd Resolver,,,:/run/systemd/resolve:/bin/false
___________________________________________________________
_____________________________________________________________________________
systemd-bus-proxy:x:123:132:systemd Bus Proxy,,,:/run/systemd:/bin/false
____________________________________________________
________________________________________________________________________
proftpd:x:124:65534::/run/proftpd:/bin/false
__________________________________
____________________________________________
ftp:x:125:65534::/srv/ftp:/bin/false
______________________________
____________________________________
_apt:x:126:65534::/nonexistent:/bin/false
__________________________________
_________________________________________
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
__________________________________
__________________________________________
bin:x:2:2:bin:/bin:/usr/sbin/nologin
______________________________
____________________________________
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
_________________________________________
____________________________________________________
sys:x:3:3:sys:/dev:/usr/sbin/nologin
______________________________
____________________________________
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
___________________________________________
____________________________________________________
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
______________________________________________________
_____________________________________________________________
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
__________________________________________
________________________________________________
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
_________________________________________________________________________
_________________________________________________________________________________
sync:x:4:65534:sync:/bin:/bin/sync
___________________________
__________________________________
games:x:5:60:games:/usr/games:/usr/sbin/nologin
_______________________________________
_______________________________________________
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
_________________________________________
_______________________________________________
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_________________________________________________
__________________________________________________________
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
_______________________________________
____________________________________________
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
____________________________________
___________________________________________
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
__________________________________________
_________________________________________________
$sort -t: -k3 --debug /etc/passwd
$sort -t: -k3 --debug /etc/passwd
sort: using ‘en_US.UTF-8’ sorting rules
root:x:0:0:root:/root:/bin/bash
________________________
_______________________________
jeffrin:x:1000:1000:Jeffrin Jose T,,,:/home/jeffrin:/bin/bash
___________________________________________________
_____________________________________________________________
uuidd:x:100:101::/run/uuidd:/bin/false
______________________________
______________________________________
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
____________________________________________
___________________________________________________
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
____________________________________
__________________________________________________
statd:x:102:65534::/var/lib/nfs:/bin/false
__________________________________
__________________________________________
sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin
__________________________________________
_________________________________________________
messagebus:x:104:106::/var/run/dbus:/bin/false
_________________________________
______________________________________________
colord:x:105:109:colord colour management daemon,,,:/var/lib/colord:/bin/false
_____________________________________________________________________
______________________________________________________________________________
usbmux:x:106:46:usbmux daemon,,,:/home/usbmux:/bin/false
_______________________________________________
________________________________________________________
avahi:x:107:113:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false
_____________________________________________________________
_____________________________________________________________________
pulse:x:108:114:PulseAudio daemon,,,:/var/run/pulse:/bin/false
______________________________________________________
______________________________________________________________
speech-dispatcher:x:109:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh
______________________________________________________________
__________________________________________________________________________________
rtkit:x:110:116:RealtimeKit,,,:/proc:/bin/false
_______________________________________
_______________________________________________
Debian-gdm:x:111:117:Gnome Display Manager:/var/lib/gdm3:/bin/false
______________________________________________________
___________________________________________________________________
saned:x:112:118::/var/lib/saned:/bin/false
__________________________________
__________________________________________
ntp:x:113:120::/home/ntp:/bin/false
_____________________________
___________________________________
geoclue:x:114:121::/var/lib/geoclue:/bin/false
____________________________________
______________________________________________
dnsmasq:x:115:65534:dnsmasq,,,:/var/lib/misc:/bin/false
_____________________________________________
_______________________________________________________
fetchmail:x:116:65534::/var/lib/fetchmail:/bin/false
________________________________________
____________________________________________________
vde2-net:x:117:123::/var/run/vde2:/bin/false
_________________________________
____________________________________________
timidity:x:118:125:TiMidity++ MIDI sequencer service:/etc/timidity:/bin/false
__________________________________________________________________
_____________________________________________________________________________
epmd:x:119:128::/var/run/epmd:/bin/false
_________________________________
________________________________________
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
______________________________________
_______________________________________________
systemd-timesync:x:120:129:systemd Time Synchronization,,,:/run/systemd:/bin/false
_______________________________________________________________
__________________________________________________________________________________
systemd-network:x:121:130:systemd Network Management,,,:/run/systemd/netif:/bin/false
___________________________________________________________________
_____________________________________________________________________________________
systemd-resolve:x:122:131:systemd Resolver,,,:/run/systemd/resolve:/bin/false
___________________________________________________________
_____________________________________________________________________________
systemd-bus-proxy:x:123:132:systemd Bus Proxy,,,:/run/systemd:/bin/false
____________________________________________________
________________________________________________________________________
proftpd:x:124:65534::/run/proftpd:/bin/false
__________________________________
____________________________________________
ftp:x:125:65534::/srv/ftp:/bin/false
______________________________
____________________________________
_apt:x:126:65534::/nonexistent:/bin/false
__________________________________
_________________________________________
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
__________________________________
__________________________________________
bin:x:2:2:bin:/bin:/usr/sbin/nologin
______________________________
____________________________________
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
_________________________________________
____________________________________________________
sys:x:3:3:sys:/dev:/usr/sbin/nologin
______________________________
____________________________________
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
___________________________________________
____________________________________________________
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
______________________________________________________
_____________________________________________________________
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
__________________________________________
________________________________________________
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
_________________________________________________________________________
_________________________________________________________________________________
sync:x:4:65534:sync:/bin:/bin/sync
___________________________
__________________________________
games:x:5:60:games:/usr/games:/usr/sbin/nologin
_______________________________________
_______________________________________________
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
_________________________________________
_______________________________________________
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_________________________________________________
__________________________________________________________
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
_______________________________________
____________________________________________
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
____________________________________
___________________________________________
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
__________________________________________
_________________________________________________
$
encryption related algorithms that are built into a typical Linux Kernel
ABOUT Cryptography
Cryptography or cryptology (from Ancient Greek: κρυπτός, translit. kryptós "hidden, secret"; and γράφειν graphein, "to write", or -λογία -logia, "study", respectively[1]) is the practice and study of techniques for secure communication in the presence of third parties called adversaries.[2] More generally, cryptography is about constructing and analyzing protocols that prevent third parties or the public from reading private messages;[3] various aspects in information security such as data confidentiality, data integrity, authentication, and non-repudiation[4] are central to modern cryptography. Modern cryptography exists at the intersection of the disciplines of mathematics, computer science, electrical engineering, communication science, and physics. Applications of cryptography include electronic commerce, chip-based payment cards, digital currencies, computer passwords, and military communications.
ABOUT CRC
A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event the check values do not match, corrective action can be taken against data corruption. CRCs can be used for error correction (see bitfilters).[1]
CRC can't fix the mistakes in frames which change the value of DE("Discard eligibility"), for example if by a mistake DE value was set from 0 to 1, CRC won't be able to return it to 0, the frame will be discarded.
CRCs are so called because the check (data verification) value is a redundancy (it expands the message without adding information) and the algorithm is based on cyclic codes. CRCs are popular because they are simple to implement in binary hardware, easy to analyze mathematically, and particularly good at detecting common errors caused by noise in transmission channels. Because the check value has a fixed length, the function that generates it is occasionally used as a hash function.
[bash]
$sudo cat /proc/crypto
name : crct10dif
driver : crct10dif-pclmul
module : crct10dif_pclmul
priority : 200
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 2
name : crc32
driver : crc32-pclmul
module : crc32_pclmul
priority : 200
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 4
name : crc32c
driver : crc32c-intel
module : crc32c_intel
priority : 200
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 4
name : lzo
driver : lzo-generic
module : kernel
priority : 0
refcnt : 5
selftest : passed
internal : no
type : compression
name : crct10dif
driver : crct10dif-generic
module : kernel
priority : 100
refcnt : 2
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 2
name : aes
driver : aes-generic
module : kernel
priority : 100
refcnt : 1
selftest : passed
internal : no
type : cipher
blocksize : 16
min keysize : 16
max keysize : 32
name : sha1
driver : sha1-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 64
digestsize : 20
name : md5
driver : md5-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 64
digestsize : 16
name : digest_null
driver : digest_null-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
internal : no
type : shash
blocksize : 1
digestsize : 0
name : compress_null
driver : compress_null-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
internal : no
type : compression
name : ecb(cipher_null)
driver : ecb-cipher_null
module : kernel
priority : 100
refcnt : 1
selftest : passed
internal : no
type : blkcipher
blocksize : 1
min keysize : 0
max keysize : 0
ivsize : 0
geniv : <default>
name : cipher_null
driver : cipher_null-generic
module : kernel
priority : 0
refcnt : 1
selftest : passed
internal : no
type : cipher
blocksize : 1
min keysize : 0
max keysize : 0
$
[/bash]
LINK
https://en.wikipedia.org/wiki/Cryptography
https://en.wikipedia.org/wiki/Cyclic_redundancy_check
https://developer.ibm.com/linuxonpower/2017/08/11/adding-power-optimized-crc-32-existing-code/
a sample session with a “filter” named tr
$cat u.txt UPPERCASE $cat l.txt cat: l.txt: No such file or directory $tr A-Z a-z l.txt $cat u.txt UPPERCASE $cat l.txt uppercase $
sample session related to “command expansion” in Bash shell
$a=`time` real 0m0.000s user 0m0.000s sys 0m0.000s $a bash: a: command not found $a=`ls` $a bash: a: command not found $echo a a $echo $a a.txt b.txt trueangle $echo `a` bash: a: command not found $a=`ls` $b=time $echo $b time $b=`time` real 0m0.000s user 0m0.000s sys 0m0.000s $echo $b $b=`time` real 0m0.000s user 0m0.000s sys 0m0.000s $echo $b $b=date $echo $b date $b=`date` $echo $b Fri Apr 22 22:50:27 IST 2016 $ http://mywiki.wooledge.org/BashFAQ/032
using the dir() Built-in function in Python programming
>>> import struct
>>> dir() # show the names in the module namespace
['__builtins__', '__doc__', '__name__', 'struct']
>>> dir(struct) # show the names in the struct module
['Struct', '__builtins__', '__doc__', '__file__', '__name__',
'__package__', '_clearcache', 'calcsize', 'error', 'pack', 'pack_into',
'unpack', 'unpack_from']
>>> class Shape(object):
def __dir__(self):
return ['area', 'perimeter', 'location']
>>> s = Shape()
>>> dir(s)
['area', 'perimeter', 'location']
https://docs.python.org/2/library/functions.html#dir
sample session using “variable expansion” with Bash shell
$com=world
$echo com
com
$echo $com
world
$x=hello
$echo ${x}{com}
hello{com}
$echo ${x}${com}
helloworld
$echo $x$com
helloworld
$echo ${x}world
helloworld
$echo ${x} world
hello world
$echo $x world
hello world
$echo $xcom
$echo $x com
hello com
$echo $x $com
hello world
$echo $x$com
helloworld
$echo $xcom
$echo ${x}com
hellocom
$
$your_id=${USER}-on-${HOSTNAME}
$echo "$your_id"
jeffrin-on-debian
$your_id=$USER-on-$HOSTNAME
$echo "$your_id"
jeffrin-on-debian
$echo ${USER}5
jeffrin5
$echo $USER5
$echo $USER 5
jeffrin 5
$echo $USER 5
jeffrin 5
$your_id=hello
$echo $your_id5
$echo $your_id 5
hello 5
$echo ${your_id}5
hello5
$
http://www.tldp.org/LDP/abs/html/parameter-substitution.html
http://guide.bash.academy/03.variables.html
what is a nondeterministic algorithm ?
In computer science, a nondeterministic algorithm is an algorithm that, even for the same input, can exhibit different behaviors on different runs, as opposed to a deterministic algorithm. https://en.wikipedia.org/wiki/Nondeterministic_algorithm
sample session about “brace and tilde” expansions in Bash
$ls
trueangle
$echo hello > a.txt
$echo killo > b.txt
$cat {a,b}.txt
hello
killo
$pwd
/home/jeffrin/temp
$cd ~
$pwd
/home/jeffrin
$cd tr
trueangle/ trueangle.old/
$pwd
/home/jeffrin
$cd -
/home/jeffrin/temp
$pwd
/home/jeffrin/temp
$ls
a.txt b.txt trueangle
$
sample session about “alias expansion” in Bash
$ls -l 1 ls: cannot access '1': No such file or directory $cat >> 1 hello $ls -l 1 -rw-r--r-- 1 jeffrin jeffrin 6 Mar 20 23:38 1 $cat 1 hello $alias appendinput="cat >>" $appendinput bash: syntax error near unexpected token `newline' $appendinput app added $cat app added $
sample session with a bash shell expansion named “history expansion”
$! 1 bash: 1: command not found $!1 bash: !1: event not found $!+1 bash: !+1: event not found $!-1 ! 1 bash: 1: command not found $!! ! 1 bash: 1: command not found $!-0 bash: !-0: event not found $