All Tips


16

Tip #839   Shutdown a windows PC from linux

A remote Windows PC can easily be shutdown, assuming you have Samba installed on your Linux box, and you have a user account on the Windows PC that has the necessary rights.

Just enter the following command, where 'thehostname' is the hostname of the remote PC, and 'theusername' is a valid user account on the remote PC:

Read more »
  • TAGS:

16

Tip #25  

Instead of adding a prefix to the previous command with 'Up-arrow Home prefix Space' try 'prefix !!' to repeat the last command with 'prefix ' before it.
You can also use '!-n' to use commands other than the most recent. Read more »

16

Tip #295   Portscan in one line

$HOST=127.0.0.1;for((port=1;port<=65535;++port));do echo -en "$port ";if echo -en "open $HOST $port\nlogout\quit" | telnet 2>/dev/null | grep 'Connected to' > /dev/null;then echo -en "\n\nport $port/tcp is open\n\n";fi;done Read more »
  • TAGS:

16

Tip #157   ssh proxy forwarding

ssh -l <login> -L <port>:<destination:port> <proxymachine> <local addy>
example
ssh -l foo -L 5000:192.168.5.2:443 192.168.1.1 https://localhost:5000/


Then go to https://localhost:<port>/ to get to destination's website; through the proxy machine.

Read more »

15

Tip #701   Stream YouTube videos directly to your media player

YouTube is great, but the embedded flash player doesn't offer a lot in the way of customizing your viewing experience. There are quite a few options for downloading flv video files from YouTube, but adding the following function to your bashrc will let you stream them directly to your choice of media player.

Read more »

15

Tip #220   Actively Monitor a File

This is a way to monitor "/var/log/messages" or any file for certain changes.
The example below actively monitors "stuff" for the word "now" and as soon as "now" is added to the file, the contents of msg are sent by email

Read more »

15

Tip #159   Download torrents from the command line

The official BitTorrent distribution includes several python client applications that can be run from the command line.

To download a torrent try:

Read more »

15

Tip #151  

How to mount an ISO image file onto a directory:

Read more »
  • TAGS:

15

Tip #140   Change extension on a group of files using only bash builtins an

To change the extension on a group of files using only bash builtins and mv:

Read more »

14

Tip #147   Find and Grep

Find all files with given name (you can use Bash expansion if you'd like), and Grep for a phrase:
Read more »