Check These Out
in loop, until the last port (65535), list all opened ports on host.
in the sample I used localhost, but you can replace with any host to test.
The biggest advantage over atoponce's nifty original is not killing the scrollback. Written assuming bash, but shouldn't be terribly difficult to port to other shells. S should be multiple spaces, but I can't get commandlinefu to save/show them properly, any help?
The output format is given by the -printf parameter:
%T@ = modify time in seconds since Jan. 1, 1970, 00:00 GMT, with fractional part. Mandatory, hidden in the end.
%TY-%Tm-%Td %TH:%TM:%.2TS = modify time as YYYY-MM-DD HH:MM:SS. Optional.
%p = file path
Refer to http://linux.die.net/man/1/find for more about -printf formatting.
------------------------
sort -nr = sort numerically and reverse (higher values - most recent timestamp - first)
head -n 5 = get only 5 first lines (change 5 to whatever you want)
cut -f2- -d" " = trim first field (timestamp, used only for sorting)
------------------------
Very useful for building scripts for detecting malicious files upload and malware injections.
alias speedtest='wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'
Displaying system temperature your system .
shellcode version @ http://inj3ct0r.com/exploits/12554
This does the following:
1 - Search recursively for files whose names match REGEX_A
2 - From this list exclude files whose names match REGEX_B
3 - Open this as a group in textmate (in the sidebar)
And now you can use Command+Shift+F to use textmate own find and replace on this particular group of files.
For advanced regex in the first expression you can use -regextype posix-egrep like this:
mate - `find * -type f -regextype posix-egrep -regex 'REGEX_A' | grep -v -E 'REGEX_B'`
Warning: this is not ment to open files or folders with space os special characters in the filename. If anyone knows a solution to that, tell me so I can fix the line.
This replaces the current bash session with a new bash session, run as an interactive non-login shell... useful if you have changed /etc/bash.bashrc, or ~/.bashrc
If you have changed a startup script for login shells, use
$ exec bash -l
Suitable for re-running /etc/profile, ~/.bash_login and ~/.profile.
edit: chinmaya points out that
$ env - HOME=$HOME TERM=$TERM bash -s "exec bash -l"
will clear any shell variables which have been set... since this verges on unwieldy, might want to use
$ alias bash_restart='env - HOME=$HOME TERM=$TERM bash -s "exec bash -l"'
Same as the other rtfm's, but using the more correct xdg-open instead of $BROWSER.
I can't find a way to open info only if the term exists, so it stays out of my version.