Latest News: Linux shell script to change you ssh port

11 useful commands for Linux/Unix administrators

Tutorial willing 694View(s) 0Comment

Command line is more powerful because you can do  lot with them,  you can tell your computer exactly what you want and get the appropriate answer, while GUI application can only tell your computer what the GUI programmer has defined.  Recently, CLI is mostly used by Linux/Unix administrators since most popular linux distros come with a complete set of GUI applications that make the user use less and less the command line.

In this post, i will show you 10 most rated linux commands for last past weeks at commandlinefu.

1- Save man-page as pdf

2- Duplicate installed packages from one machine to the other (RPM-based systems)

3- Stamp a text line on top of the pdf pages to quickly add some remark, comment, stamp text, … on top of (each of) the pages of the input pdf file

4- Display the number of connections to a MySQL Database

Count the number of active connections to a MySQL database.
The MySQL command “show processlist” gives a list of all the active clients.
However, by using the processlist table, in the information_schema database, we can sort and count the results within MySQL.

5- Create a local compressed tarball from remote host directory

This improves on #9892 by compressing the directory on the remote machine so that the amount of data transferred over the network is much smaller. The command uses ssh(1) to get to a remote host, uses tar(1) to archive and compress a remote directory, prints the result to STDOUT, which is written to a local file. In other words, we are archiving and compressing a remote directory to our local box.

6- tail a log over ssh

This is also handy for taking a look at resource usage of a remote box.

7- Print diagram of user/groups

Parses /etc/group to “dot” format and pases it to “display” (imagemagick) to show a usefull diagram of users and groups (don’t show empty groups).

8- Draw kernel module dependancy graph.

Parse lsmod’ output and pass to dot’ drawing utility then finally pass it to an image viewer

9- Create strong, but easy to remember password

Why remember? Generate!
Up to 48 chars, works on any unix-like system

10- Find all files larger than 500M and less than 1GB

11- Limit the cpu usage of a process

This will limit the average amount of CPU it consumes.

Source:https://www.unixmen.com/11-useful-commands-for-linuxunix-administrators/

Please give credit to the original author when you use it elsewhere: VPS List Agent » 11 useful commands for Linux/Unix administrators

Login to post a comment!