All Tips


10

Tip #445   Local/remote webserver

Serve files on port 8080 for anybody from the directory from where you start this command:

:;while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";o="$h 200 OK\r\n";c="Content";if [ -z $f ];then($e $o;ls|(while $r n;do if [ -f "$n" ]; then $e "<a href=\"/$n\">`ls -gh $n`
";fi;done););elif [ -f $f ];then $e "$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`";$e;cat $f;else $e -e "$h 404 Not Found\n\n404\n";fi)';done Read more »

7

Tip #412   Vi mode in bash

Add "set -o vi" at the bottom of ~/.bashrc or /etc/bashrc, then press ESC in prompt to enter vi mode and search your issued command in history by giving a "/" at front.

For example, in shell command line, press ESC, type /ls, enter. Read more »

6

Tip #405   Find all SSH Hosts

If you want to find all SSH enabled hosts in all subnets to which your computer is connected, you can use this oneliner:

Read more »
  • TAGS:

4

Tip #404   An interactive perl shell

I've long been frustrated by the lack of an interactive perl shell, where I can enter commands and see the results immediately. Yes, I have tried the perl debugger.

Read more »

3

Tip #403   list the most recent files in a directory

If you just want to find out what's new in a directory:

Read more »

8

Tip #401   Convert nrg to iso

Simply convert .nrg (Nero format) images to .iso format images with dd:
Nero writes a 300kb header onto the iso, so dropping the first 300kb results in a .iso format image.

Read more »
  • TAGS:
  • dd

1

Tip #394   Unpack DEB-Packages withour installing

To unpack an Debian packages without installing or configuring it:

ar -x package.deb

Gives "control.tar.gz" and "data.tar.gz". The data which would be installed is in data.tar.gz. Read more »
  • TAGS: