Display the top 10 processes ranked by memory usage
Answer:
You can display the top 10 processes, ranked by memory usage.
# ps aux | sort -nk +4 | tail
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Display the top 10 processes ranked by memory usage
Answer:
You can display the top 10 processes, ranked by memory usage.
# ps aux | sort -nk +4 | tail
Give line numbers to a text file
Answer:
To add line numbers to a text file, you can use the nl command.
# nl input.txt
/etc/inittab is missing in Ubuntu
Answer:
Yes, this is expected.
The default runlevel in Ubuntu is 2, and upstart will take care of all the init stuffs, don't worry.
Reference: http://upstart.ubuntu.com/
How to create an empty file in Linux
Answer:
A simple touch command will create an empty file for you.
# touch test.txt
Network connectivity testing using ping command
Answer:
To test the network connection between your server and other place, such as google.com, you can use the ping command
# ping google.com
PING google.com (64.233.189.103) 56(84) bytes of data.
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
64 bytes from hkg01s01-in-f103.1e100.net (64.233.189.103)..
.
.
.
Successful connection will return something similar to the above