Skip to content

Instantly share code, notes, and snippets.

@mw866
Last active January 10, 2022 06:35
Show Gist options
  • Save mw866/a66d75f1d4915dd137c1c038b920537a to your computer and use it in GitHub Desktop.
Save mw866/a66d75f1d4915dd137c1c038b920537a to your computer and use it in GitHub Desktop.
#linux
# Get dates in RFC3339
gdate -Iseconds -u
brew list coreutils
# unzip tar.xz
tar -xf file.tar.xz
# List env variables
printenv
# unit files
sudo systemctl list-units --type=service --state=active
systemctl list-unit-files
netstat -ntlp | grep LISTEN
# for boot issues
journalctl -b
# tail logs
journalctl -f
journalctl -n 20
# find https://www.digitalocean.com/community/tutorials/how-to-use-find-and-locate-to-search-for-files-on-linux
find -iname "query"
# recusive mkdir
mkdir -p foo/bar/zoo/andsoforth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment