Skip to content

Instantly share code, notes, and snippets.

@raulqf
Last active November 19, 2021 02:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raulqf/973fd3cf630f3383c811575f58df2319 to your computer and use it in GitHub Desktop.
Save raulqf/973fd3cf630f3383c811575f58df2319 to your computer and use it in GitHub Desktop.
Linux Tips

List of Linux Tips

Kill all the process defined by a process name:

ps -aux | grep 'myProcessName' | grep -v grep | awk '{print $2}' | xargs -r kill -9

Check a line from multiple files:

find . -name 'process.sh' | xargs sed -i 's/..\/load_env.sh/modules\/load_env.sh/g'

Increase the history size and format:

export HISTTIMEFORMAT='%F %T  '
export HISTSIZE=1000000
export HISTCONTROL=ignoreboth

Directory utilities:

du -sk * | sort -n  -> sort directories by file size.

Alias definition:

$ cat /etc/profile.d/local.sh
alias dir="ls -al"
alias ll="ls --color=auto -alio --time-style=+'%Y-%m-%d %H:%M:%S'"
alias l="ls --color=auto -aCF"
alias a=alias
alias et="exec tcsh"

Check WiFi Singal strength:

iwconfig wlan0 | grep 'Signal level'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment