umask – set file mode creation mask #include <sys/types.h> #include <sys/stat.h> mode_t umask(mode_t mask); Binary Number ————–> Decimal Number Abstraction Decide the required result to decide the needed mask. Binary Number ——————-> Resultant Binary ANDing with mask
Author Archives: jeffrin
Bit level Operations in C
Bit-Level Operations in C Technical Overview One of the reasons why C has become so popular is that it allows the programmer to do many types of machine-level applications without resorting to using machine language as the vehicle for programming. One example of that is C’s ability to work with memory addresses. Another example, or …
quote command
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 …
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 …
Continue reading “What if a user or group name is a string of digits?”