cp (copy) command
df command (may be disk free)
kill and nohup command
shuf command from bash
GIMP Text and Colorize
GNU coreutils: Sources of random data
script file contents
#!/bin/bash
get_seeded_random()
{
seed="$1"
echo $seed
openssl enc -aes-256-ctr -pass pass:"$seed" -nosalt \
/dev/null
}
shuf -i1-100 --random-source=<(get_seeded_random 45)
using /dev/urandom
$sudo shuf -i1-5 --random-source=/dev/urandom 1 2 4 3 5 $sudo shuf -i1-5 --random-source=/dev/urandom 3 4 5 1 2 $sudo shuf -i1-5 --random-source=/dev/urandom 4 5 2 1 3 $sudo shuf -i1-5 --random-source=/dev/urandom 4 2 3 1 5 $sudo shuf --random-source=/dev/urandom ^C $sudo shuf -i1-10 --random-source=/dev/urandom 2 4 6 10 7 8 5 3 1 9 $sudo shuf -i1-10 --random-source=/dev/urandom 6 2 10 3 5 8 7 9 4 1 $sudo shuf -i1-10 5 4 10 8 9 6 7 1 2 3 $sudo shuf qq qq $sudo shuf -i1-100 --random-source=/dev/urandom 65 51 62 79 41 35 26 36 52 77 54 82 48 99 75 17 39 31 1 7 88 61 9 94 73 70 63 55 44 38 23 84 15 25 53 85 66 16 20 69 81 32 98 45 96 49 74 10 4 59 93 40 12 13 50 100 14 90 6 68 8 57 5 34 60 67 80 3 2 78 18 76 21 92 33 56 24 37 87 83 47 29 97 46 89 43 91 27 11 58 64 19 28 86 95 72 30 22 71 42 $sudo shuf -i1-100 --random-source=/dev/random 8 79 40 19 62 27 90 71 9 93 32 85 21 3 26 31 63 18 99 2 78 11 100 49 75 64 37 13 39 30 29 73 82 34 55 14 35 80 84 33 67 98 92 25 87 51 41 88 10 4 97 45 53 68 16 15 47 46 42 36 54 94 70 28 61 83 58 96 69 91 59 1 72 38 5 23 60 12 74 44 7 52 48 86 43 95 20 65 50 24 76 22 6 66 81 89 56 77 17 57 $sudo shuf -i1-100 --random-source=/dev/null shuf: ‘/dev/null’: end of file $sudo shuf -i1-100 --random-source=/dev/zero 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 $
What if a user or group name is a string of digits?
root>useradd 1991 root>mkdir /home/1991 root>chown 1991.1991 /home/1991/ root>passwd 1991 Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully root>login 1991 Password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. $ root>deluser 1991 Removing user `1991' ... Warning: group `1991' has no more members. Done. root> root>ls Desktop root>cd /home/ root>ls 1991 jeffrin root>rm -r 1991/ root>cd root> root>useradd 471 root>mkdir /home/471 root>chown 471.471 /home/471/ root>ls -l /home/ total 8 drwxr-xr-x 2 471 471 4096 Apr 15 17:57 471 drwxr-xr-x 24 jeffrin jeffrin 4096 Apr 15 17:25 jeffrin root>chown +471:+471 /home/471/ root>ls -l /home/ total 8 drwxr-xr-x 2 471 471 4096 Apr 15 17:57 471 drwxr-xr-x 24 jeffrin jeffrin 4096 Apr 15 17:25 jeffrin root>chown +471 /home/471/ root>ls -l /home/ total 8 drwxr-xr-x 2 471 471 4096 Apr 15 17:57 471 drwxr-xr-x 24 jeffrin jeffrin 4096 Apr 15 17:25 jeffrin root>
https://www.gnu.org/software/coreutils/manual/coreutils.html#Disambiguating-names-and-IDs
GNU coreutils: signal specifications . commands “kill” and “nohup”
$kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM 16) SIGSTKFLT 17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP 21) SIGTTIN 22) SIGTTOU 23) SIGURG 24) SIGXCPU 25) SIGXFSZ 26) SIGVTALRM 27) SIGPROF 28) SIGWINCH 29) SIGIO 30) SIGPWR 31) SIGSYS 34) SIGRTMIN 35) SIGRTMIN+1 36) SIGRTMIN+2 37) SIGRTMIN+3 38) SIGRTMIN+4 39) SIGRTMIN+5 40) SIGRTMIN+6 41) SIGRTMIN+7 42) SIGRTMIN+8 43) SIGRTMIN+9 44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13 48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12 53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9 56) SIGRTMAX-8 57) SIGRTMAX-7 58) SIGRTMAX-6 59) SIGRTMAX-5 60) SIGRTMAX-4 61) SIGRTMAX-3 62) SIGRTMAX-2 63) SIGRTMAX-1 64) SIGRTMAX $kill -19 `pidof chromium-browse` $kill -18 `pidof chromium-browse` $kill -5 `pidof chromium-browse` $kill -1 `pidof chromium-browse` $nohup chromium-browser nohup: ignoring input and appending output to 'nohup.out' $ $nohup chromium-browser nohup: ignoring input and appending output to 'nohup.out' $ $kill -1 `pidof chromium-browse` kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] $kill -3 `pidof chromium-browse` kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] $nohup chromium-browser nohup: ignoring input and appending output to 'nohup.out' $ $ $ $echo $? 0 $
GNU coreutils: block size related to df command
ABOUT df df (abbreviation for disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access. df is typically implemented using the statfs or statvfs system calls.
[bash]
$df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1921644 0 1921644 0% /dev
tmpfs 388676 6508 382168 2% /run
/dev/sda2 475184136 6024592 444951776 2% /
tmpfs 1943372 1460 1941912 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 1943372 0 1943372 0% /sys/fs/cgroup
/dev/sda1 523248 3660 519588 1% /boot/efi
tmpfs
[/bash] 388672 104 388568 1% /run/user/1000
[bash]
$df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 380M 6.4M 374M 2% /run
/dev/sda2 454G 5.8G 425G 2% /
tmpfs 1.9G 1.5M 1.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 511M 3.6M 508M 1% /boot/efi
tmpfs 380M 104K 380M 1% /run/user/1000
$export DF_BLOCK_SIZE=2k
[/bash]
[bash]
$df
Filesystem 2K-blocks Used Available Use% Mounted on
udev 960822 0 960822 0% /dev
tmpfs 194338 3254 191084 2% /run
/dev/sda2 237592068 3012288 222475896 2% /
tmpfs 971686 136 971550 1% /dev/shm
tmpfs 2560 2 2558 1% /run/lock
tmpfs 971686 0 971686 0% /sys/fs/cgroup
/dev/sda1 261624 1830 259794 1% /boot/efi
tmpfs 194336 50 194286 1% /run/user/1000
$export POSIXLY_CORRECT=1
[/bash]
[bash]
$df
Filesystem 2K-blocks Used Available Use% Mounted on
udev 960822 0 960822 0% /dev
tmpfs 194338 3252 191086 2% /run
/dev/sda2 237592068 3018782 222469402 2% /
tmpfs 971686 618 971068 1% /dev/shm
tmpfs 2560 2 2558 1% /run/lock
tmpfs 971686 0 971686 0% /sys/fs/cgroup
/dev/sda1 261624 1830 259794 1% /boot/efi
tmpfs 194336 46 194290 1% /run/user/1000
$set -o posix
[/bash]
[bash]
$df
Filesystem 2K-blocks Used Available Use% Mounted on
udev 960822 0 960822 0% /dev
tmpfs 194338 3252 191086 2% /run
/dev/sda2 237592068 3018774 222469410 2% /
tmpfs 971686 618 971068 1% /dev/shm
tmpfs 2560 2 2558 1% /run/lock
tmpfs 971686 0 971686 0% /sys/fs/cgroup
/dev/sda1 261624 1830 259794 1% /boot/efi
tmpfs 194336 46 194290 1% /run/user/1000
$
[/bash]
https://en.wikipedia.org/wiki/Df_(Unix)
https://www.gnu.org/software/coreutils/manual/coreutils.html#df-invocation





