Skip to content

Instantly share code, notes, and snippets.

@mrfratello
Last active May 24, 2023 12:40
Show Gist options
  • Save mrfratello/91ff54b960fff2346787d9610df796c1 to your computer and use it in GitHub Desktop.
Save mrfratello/91ff54b960fff2346787d9610df796c1 to your computer and use it in GitHub Desktop.
hint by lunix commands in terminal
  1. How long the system has been running

uptime

  1. Find id of process then kill it
ps axu | grep process_name
kill -9 process_id
  1. Find id of process by port then kill it
lsof -i tcp:port_number
kill -9 process_id
  1. Copy the content of the folder in other exist folder
cp -av source/folder/* target/folder/
  1. Archive content of the folder
zip -r target.zip folder/*
  1. Show dir sizes
du -h -d 1 path/to/folder
  1. Show dir sizes with sort
du -d 1 path/to/folder | sort -rnk1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment