Skip to content

Latest commit

 

History

History
52 lines (45 loc) · 1.16 KB

File metadata and controls

52 lines (45 loc) · 1.16 KB

Linux Note

Check hardware name

dmidecode | grep "Product Name"

Check CPU spec

cat /proc/cpuinfo | grep name | awk -F: '{print $(NF)}' | uniq -c

View a certain user's processes ref

top -U [username]

Clear memory cache

Linux' memory cache manager was located in localhost:11211 by default, use telnet to enter it.

$ telnet localhost 11211

After system says ok, insert:

flush_all

then type quit to leave talnet mode.

Empty the contents of a file ref

$ truncate -s 0 yourFileName

Find which ports are being used now ref

  • find all
$ netstat -tulpn
  • find a specific port
$ netstat -tulpn | grep :80

Archive hidden files or directories (dot files)

  • Use command below to enable dot file including
$ shopt -s dotglob
  • Use command below to roll back to default setting
$ shopt -u dotglob