Khoa Bui's Website

Resume

Linkedin

Github

Academic Works

Contact Me

Notes

Build from source:

  1. Extract with:
    tar xjf <tarfile>
    
  2. Make the configuration which can be check with:
    ./configure -help
    
  3. Run the following:
    make
    make install
    

Regular expression basics:

You can use the following to find and replace in vim:

:%s/PATTERN/REPLACEMENT/

Use the following to replace all:

:%s/PATTERN/REPLACEMENT/g

Text Output:

To do stdout output:

1>

To do stderr output:

2>

To do both

2>&1

Exit code number:

echo $?

Using find command:

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> \;

Using tar and comnpression algorithms:

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>' 

Export

The export command is a built-in Bash shell command that exports environmental variables as child processes without affecting the existing environment variables.

What’s a process?

Control processes’ limits

Managing processes

Monitoring processes

Troubleshooting Technigues

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