Check These Out
sorts the contents of a file without the need for a second file to take the sorted output.
This was previously entered as `sort -g list.txt -o $_` but as others have pointed out the $_ references the previous command. so this would've worked had that been the second part of a command joined with && like:
cat list.txt && sort -g list.txt -o $_
The user below me Robin had the most correct command.
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Probably the quickest / easiest way to clear the screen.
You'll need "feh" to set the background from the commandline. Install with "apt-get install feh"
Thanks to the Redditors on this thread: http://www.reddit.com/r/linux/comments/bira4/is_there_a_linux_version_of_this_preferably_a/
e.g.
fuser 25/tcp (see which pid is listening on smtp)
Yes, rsync(1) supports local directories. And, should anything change, it's trivial to run the command again, and grab only the changes, instead of the full directory.
You must have PHP 5.4.0 or later to be able to run the built in server.
This web server is designed for developmental purposes only, and should not be used in production.
URI requests are served from the current working directory where PHP was started, unless the -t option is used to specify an explicit document root. If a URI request does not specify a file, then either index.php or index.html in the given directory are returned. If neither file exists, then a 404 response code is returned.
If a PHP file is given on the command line when the web server is started it is treated as a "router" script. The script is run at the start of each HTTP request. If this script returns FALSE, then the requested resource is returned as-is. Otherwise the script's output is returned to the browser.
Standard MIME types are returned for files with extensions: .css, .gif, .htm, .html, .jpe, .jpeg, .jpg, .js, .png, .svg, and .txt. The .htm and .svg extensions are recognized from PHP 5.4.4 onwards.
More information here: http://php.net/manual/en/features.commandline.webserver.php
from
1.ogg
2.ogg
3.ogg
10.ogg
11.ogg
to
01.ogg
02.ogg
03.ogg
10.ogg
11.ogg