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

SK

|

Yes we can. What kind of help you need? We are doing outsourcing and technical support for Linux and Open source worldwide. To know more about the details visit here.

ClintB

|

After install as above, run shell script /opt/Citrix/ICAClient/wfica.sh manually and note lib errors still occur. I had the x64 motif loaded but had to manually install the x86 too. Got that from http://rpmfind.net/linux/rpm2html/search.php?query=libXm.so.4 Even after that, I still had to do a “yum install alsa-lib.i686 alsa-lib.x86_64″ to resolve any additional libasound.so.2 errors. Once those two lib issues were resolved, Citix Web Interface launched apps fine by telling browser to open launch.ica using /opt/Citrix/ICAClient/wfica.sh. Good luck Ernesto!

AD

|

I need some Help on Linux,can you guide me ?

Edson Carlos

|

In debian no found. I need link download install in linux debian

jacky can

|

You can actually unzip your secret archive by leaving out the -t option, instead using:

unzip newPhoto.jpg

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