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:
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 »
- TAGS:
- history
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:
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 »
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 »
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 »
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 »
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 »
- TAGS:
- bash
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 »
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs