Some Very Cool Linux Commands to get Complex Things Done Easily
Linux is ultimately the most versatile and Powerful OS ever built and that is why it attracts hackers and tech savvy guys lot, now I have collected some Special linux commands that will help you do complex things easy and will also help you save your precious time
To Serve Current Directory on Web without Installing a Web Server – Use it Share your Files to your friend over the Web
$ python -m SimpleHTTPServer 8080
This Command will serve the current directory tree at http://$HOSTNAME:8080/
So if you wished to share some files with your friend over the Internet streaming them right from your pc then just run this script, check your IP using whatismyip.com and then ask your friend to open,
http://Your IP:8080/ for example http://123.34.56.12:8080/ and he/she can copy your files immediately
To Run a Linux Command at a Given Time
echo “ls -l” | at midnight
OR
echo “ls -l” | at 10am Jul 21
Now , the first command will do a “ls -l” at midnight , and to run any other command at a specific time just type in the command then the pipe operator(|) followed by “at time”
Like the second command will do a “ls -l” at 10 am on july 21st
Update Twitter From the Linux Command Line
curl -u user:pass -d status=”I am Tweeting from the shell” http://twitter.com/statuses/update.xml
Now all you have to do is replace user by your twitter username , pass by your password and the text inside status to whatever you wish to set your status too .
It uses cUrl library to post your message
To Display Programs/Process consuming Maximum Memory
ps aux | sort -nk +4 | tail
The above command displays the 10 most resource hogging process consuming big share of your memory.
An Impressive One – List of Commands you use Often at Shell
history | awk ‘{a[$2]++}END{for(i in a){print a[i] ” ” i}}’ | sort -rn | head
See What is Stored inside your RAM
This command will display all strings currently stored in your RAM , will sure make you feel Good if you love to play with your PC
sudo dd if=/dev/mem | cat | strings
I would add more of such problem solving and time saving commands for Linux in this post later On
Hope these commands made you feel like the king of Linux 🙂
I like those commands, very informative. Thanks