Check These Out
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"
}
You can push files to up to 32 servers at once assuming ssh keys are in place.
Great tool, it is part of the pssh suite.
!# is the currennt line so far, by using !#:- you can go from the second arg (it's zero indexed) to the last ($)
(did I understand the problem correctly?)
First get a api key for google url shortner from here https://developers.google.com/url-shortener/
Then replace the API_KEY in the command
Create a temporary file that acts as swap space. In this example it's a 1GB file at the root of the file system. This additional capacity is added to the existing swap space.
This assumes you have the package installed necessary for converting WMF files. On my Ubuntu box, this is libwmf-bin. I used this command, as libwmf is not on my wife's iMac, so I archived the directories containing the WMF files from OS X, ran them on my Ubuntu box, archived the resulting SVGs, and sent them back to her. Quick, simple and to the point.
Searches directories recursively looking for extensions ignoring case. This is much more readable and clean than -exec for find. The while loop also gives further flexibility on complex logic. Also, although there is 'wmf2svg --auto', it expects lowercase extensions, and not uppercase. Because I want to ignore case, I need to use the -o option instead.
Works in ZSH and BASH. Haven't tested in other shells.
Parses /etc/group to "dot" format and pases it to "display" (imagemagick) to show a usefull diagram of users and groups (don't show empty groups).
Requires a listening port on HOST
eg. "cat movie.mp4 | nc -l 1356 " (cat movie.mp4 | nc -l PORT)
Useful if you're impatient and want to watch a movie immediately and download it at the same time without using extra bandwidth.
You can't seek (it'll crash and kill the stream) but you can pause it.