Google Plus

Useful commands for daily use

Written by Mel Kham on . Posted in linux command

“Under Linux there are graphical user interfaces (GUIs), where you can point and click and drag, and hopefully get work done terminalwithout first reading lots of documentation. The traditional Unix environment is a CLI (command line interface), where you type commands to tell the computer what to do. That is faster and more powerful, but requires finding out what the commands are.” -man intro-

Find in this post a list of some useful commands for this week.

- Download a file and uncompress it while it downloads

$wget http://URL/FILE.tar.gz -O - | tar xfz -

- If you play loto, try this command to generate the 6 numbers :

$echo $(shuf -n 6 -i 1-49 | sort -n)

- To get the CPU temperature continuously on the desktop

$while :; do acpi -t | osd_cat -p bottom ; sleep 1; done &

- Search for large files and show size and location.


$find . -size +100000k -exec du -h {} ;

- Get a random Command

$ls /usr/bin | shuf -n 1

This is useful if you want to explore various random commands.

More commands :

- Bash logger :Log everything from a bash script to a file

$script /tmp/log.txt

- Using NMAP to check if a port is open or close

$nmap -oG - -T4 -p22 -v 192.168.0.254 | grep ssh

- Get the IP of the host your coming from when logged in remotely

$echo ${SSH_CLIENT%% *}

 

If you know more commads please share them by commenting this post. Thanks.

{module user9-footer}

Useful Links: commandlinefu.com

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • dazndom

    temp and lotto commands dont work in ubuntu

  • pirat9

    IT WORKS UNDER UBUNTU
    pirat9@Server-unixmen:~$ echo $(shuf -n 6 -i 1-49 | sort -n)
    17 20 21 30 31 33
    pirat9@Server-unixmen:~$ echo $(shuf -n 6 -i 1-49 | sort -n)
    5 27 39 41 42 43
    pirat9@Server-unixmen:~$ echo $(shuf -n 6 -i 1-49 | sort -n)
    15 24 26 29 31 41

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Maximiliano Osorio

|

Osom. Thank you.

Sam

|

Thanks much. It worked like a charm.

HailsandNails

|

Actually, what I see too much of, and what Microsoft actually (sorta) did with Windows 8 is think forward. And let’s be brutally honest. Windows 8 is actually NOT as bad as people is making it out, they’re just freakishly afraid of change (which Linux users are as well, it seems)

SK

|

Yes i will. Keep visiting. Subscribe us to get daily updates. Thanks for the comment

Rakesh Vijayan

|

Hi SK

I am Rakesh vijayan thanks for your great work ,by your work I start to learn what is ldap , my request is will you make tutorial for ldap and samba pdc for us on ubuntu 12.04

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .