Tech.Linux History

Hide minor edits - Show changes to markup

January 11, 2018, at 12:16 PM by 193.51.236.195 -
Changed line 45 from:

top 10 process using the most memory:

to:

Top 10 process using the most memory

January 11, 2018, at 12:15 PM by 193.51.236.195 -
Added lines 43-47:

(:sourceend:)

top 10 process using the most memory:

(:source lang=bash :) ps aux --sort=-%mem | awk 'NR<=10{print $0}'

October 18, 2016, at 11:14 AM by 193.51.236.195 -
Changed lines 38-43 from:

It will list files having a size > 4000k in /.

to:

It will list files having a size > 4000k in /.

List installed packages

(:source lang=bash :) dpkg -l | grep '^ii' (:sourceend:)

August 19, 2013, at 09:32 AM by 193.51.236.243 -
Changed lines 32-38 from:

It will give the top ten of big folders sorted by size (in Mb) descending.

to:

It will give the top ten of big folders sorted by size (in Mb) descending.

Find big files

(:source lang=bash :) find /-size +4000k -exec ls -lia {} \; (:sourceend:) It will list files having a size > 4000k in /.

August 19, 2013, at 09:23 AM by 193.51.236.243 -
Added lines 27-32:

Find big folders in a file system

(:source lang=bash :) du -hms /* | sort -nr | head (:sourceend:) It will give the top ten of big folders sorted by size (in Mb) descending.

June 21, 2013, at 09:55 PM by 93.9.178.208 -
Changed line 9 from:

It will forward all incoming data from localhost:2080 to webserver.org:80.

to:

It will forward all incoming data from localhost:13306 to server.org:3306.

May 31, 2013, at 01:24 PM by 193.51.236.243 -
Added line 11:
ssh-tunneling
May 31, 2013, at 01:19 PM by 193.51.236.243 -
Added lines 20-24:

(:sourceend:)

List open ports

(:source lang=bash :) netstat -lnptu

May 31, 2013, at 12:23 PM by 10.201.5.239 -
Changed lines 18-20 from:
  find . -name Makefile | xargs grep pattern
to:

(:source lang=bash :) find . -name Makefile | xargs grep pattern (:sourceend:)

May 31, 2013, at 12:23 PM by 10.201.5.239 -
Changed lines 14-18 from:

(:sourceend:)

to:

(:sourceend:)

How to search a pattern in a set of files

The best option is to use find to construct the set of files and then use grep.

  find . -name Makefile | xargs grep pattern
May 30, 2013, at 08:05 PM by 109.14.89.4 -
Changed line 7 from:

ssh -L 2080:localhost:80 user@webserver.org

to:

ssh -L 13306:localhost:3306 user@server.org

Added lines 10-14:

Some web servers are only available through a gateway. To access it from your computer, you can also use a SSH tunnel: (:source lang=bash :) ssh -L 8080:webserver:80 gw (:sourceend:)

May 30, 2013, at 08:00 PM by 109.14.89.4 -
May 29, 2013, at 07:50 AM by 193.51.236.243 -
Added lines 1-9:

How to set up an SSH tunnel?

(:source lang=bash :) ssh -L [tunnel-in-port]:[client-host]:[tunnel-out-port] [user@host-to-reach] (:sourceend:) Example: (:source lang=bash :) ssh -L 2080:localhost:80 user@webserver.org (:sourceend:) It will forward all incoming data from localhost:2080 to webserver.org:80.