Firefox 16, a treat for developers http://t.co/cnd27CzT
11 useful commands for Linux/Unix administrators
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
man -t awk | ps2pdf - awk.pdf
2- Duplicate installed packages from one machine to the other (RPM-based systems)
ssh root@remote.host "rpm -qa" | xargs yum -y install
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
echo "This text gets stamped on the top of the pdf pages." | enscript -B -f Courier-Bold16 -o- | ps2pdf - | pdftk input.pdf stamp - output output.pdf
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.
mysql -u root -p -BNe "select host,count(host) from processlist group by host;" information_schema
5- Create a local compressed tarball from remote host directory
ssh user@host "tar -zcf - /path/to/dir" > dir.tar.gz
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.
ssh -t remotebox "tail -f /var/log/remote.log"
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).
awk 'BEGIN{FS=":"; print "digraph{"}{split($4, a, ","); for (i in a) printf ""%s" [shape=box]n"%s" -> "%s"n", $1, a[i], $1}END{print "}"}' /etc/group|display
8- Draw kernel module dependancy graph.
Parse `lsmod’ output and pass to `dot’ drawing utility then finally pass it to an image viewer
lsmod | perl -e 'print "digraph "lsmod" {";<>;while(<>){@_=split/s+/; print ""$_[0]" -> "$_"n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -
9- Create strong, but easy to remember password
Why remember? Generate!
Up to 48 chars, works on any unix-like system
read -s pass; echo $pass | md5sum | base64 | cut -c -16
10- Find all files larger than 500M and less than 1GB
find / -type f -size +500M -size -1G
11- Limit the cpu usage of a process
This will limit the average amount of CPU it consumes.
sudo cpulimit -p pid -l 50
-
http://web.ncf.ca/shawnhcorey/
-
-
-
-
-
-
http://twitter.com/dhanusuraasi
-
-
-
-
-
-
-
-
-
-
-
http://twitter.com/d3m0n35
-
-
http://twitter.com/d3m0n35
Like us on Facebook
This week Top Posts 
Top Things to do After Installing Ubuntu 13.04 ‘Raring Ringtail’ : Ubuntu 13.04 Raring Ringtail final is almost out. The final release it scheduled for release on Apri...0 comment(s) |
Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comment(s) |
Howto: Upgrade to Ubuntu 13.04 Raring Ringtail from 12.04, 12,10 | Desktop & Server : Updated 05-04-2013: Ubuntu 13.04 Raring Ringtail will be released Soon, If you have ubuntu 12,10, 12...0 comment(s) |
Steganography- Hide Your Files Inside An Image in Linux : Nowadays, our personal computer is not only a work tool, it is also our private space where we sto...1 comment(s) |
How to use Remote Desktop in Ubuntu : Sometimes, we need to access our computer from other locations when we’re not at home and such. This...0 comment(s) |
Configure conky-Lua in Ubuntu (12.10 & 13.04 Raring Ringtail), Fedora, debian and LinuxMint | Howto Conky : Updated 05-04-2013: Conky is a free, light-weight system monitor for X, that displays any informatio...0 comment(s) |
Recent Posts
- Steganography- Hide Your Files Inside An Image in Linux
- Unix/Linux File Recognition. Did You Know?
- Migrate from MySQL to MariaDB in FreeBSD
- Connect Your Android Galaxy Tablet to Ubuntu via USB
- ElementaryOS Beta 1 and 2 Comparison and Review
- Introduction to the Linux Command Line
- A Secure Password
- Linux Kernel 3.10. It’s BIG!
- Monitoring Users Activity Using psacct or acct Tools in Linux
- Run Your Own Social Network Using elgg on RHEL / CentOS and Scientific Linux
Recent Comments



















LinuxSytesNet
| #
sabayon facebook group is not maintained by him but a French guy. Go back to your zorin os.
Nidal Samara
| #
How do I save the entier URL?
for example: page.asp?page=12,
After adding the IfModule in .htaccess I see the correct 404, but 404 url is not shoing the query string , only page.asp
abhishek Bagusetty
| #
Hey Mel,
First of all, its good that you have figured a way to block torrents using iptables. I am new to networking and would like to do couple of things.
1) Monitor the network activity in the home network
2) Block all the torrents from downloading.
Is there a tool or a way in linux which could give me some solutions to meet the above mentioned cases. I dont want to use any commercial programs as I am more towards OpenSource. It would be greatful if you could offer me some help.
Thanks,
Abhi
Abhishek
Department of Chemical Engineering
The University of Utah
Ernesto Gutierrez
| #
Mel, I’ve been unsuccessful at installing citrix receiver on a 64 bit fedora install.
Eventhough I am following your instructions to the T.
Can you provide guidance via email?
SK
| #
Yes you can. It should work.