tar xjf <tarfile>
./configure -help
make
make install
You can use the following to find and replace in vim:
:%s/PATTERN/REPLACEMENT/
Use the following to replace all:
:%s/PATTERN/REPLACEMENT/g
To do stdout output:
1>
To do stderr output:
2>
To do both
2>&1
Exit code number:
echo $?
Find can use with negation with !. As well find to find dates:
find ! -newermt <date>
Find can also be run with exec command as follow:
find <conditions> -exec <execution command> \;
Main three tar options:
tar -xf #Extract files
tar -cf #Compress files
tar -tf #List files
To compress a directory:
tar -cf <compress_file_name> -C <directory_name> .
To use a specific compression algortihm with its flag:
tar -I '<compression_name> <flag>'
The export command is a built-in Bash shell command that exports environmental variables as child processes without affecting the existing environment variables.
ulimit [options] [limit]
This would only affects the current shell. To make changes that are effective for all logged-in users, you need to modify /etc/security/limits.conf and then reboot.
sudo updatedb &
CTRL-Z suspends a foreground process. bg makes it run in the background. fg puts it in the foreground. CTRL-C terminates a foreground process.
warning: commands will be executed using /bin/sh
at Thu Jan 2 04:58:00 2025
at> echo "2 days later"
at> <EOT>
job 1 at Thu Jan 2 04:58:00 2025
Use CTRL-D to insert the EOT character.
root@mariadb:~# ps -o pid,user,uid,priority,cputime,pmem,size,command
PID USER UID PRI TIME %MEM SIZE COMMAND
3575 root 0 20 00:00:00 0.0 1284 sudo su -
3576 root 0 20 00:00:00 0.0 804 su -
3577 root 0 20 00:00:00 0.0 1720 -bash
3620 root 0 20 00:00:00 0.0 1100 ps -o pid,user,uid,priority,cputi
Steps to procedurally troubleshoot: - Characterize the problem - Reproduce the problem - Do the easy things first - Eliminate possible causes one at a time - Change only one thing at a time; if that does not fix the problem, change it back - Check the system logs (/var/log/messages, /var/log/secure, etc.) for further information