Check These Out
This variation can handle file paths containing spaces.
This is a shortcut to tar up all files matching a wildcard. Tar doesn't have the --include (apparently).
eh stands for Edit History
.
Frequently, I'll mistype a command, and then step back through my history and correct the command. As a result, both the correct and incorrect commands are in my history file. I wanted a simple way to remove the incorrect command so I don't run it by mistake.
.
When running this function, first the ~/bash_history file is updated, then you edit the file in vi, and then the saved history file is loaded back into memory for current usage.
.
while in vi, remember that `Shift-G` sends you to the bottom of the file, and `dd` removes a line.
.
this command is different than bash built-in `fc` because it does not run the command after editing.
1. it find your public ip via ifconfig.io
2. than use this IP to request your timezone via worldtimeapi.org
3. and send it to the command timedatectl set-timezone
I just wanted a simple DNS request.
Because host and nslookup commands are not on all systems, we use getent instead.
Thanks aulem for that tip.
When playback of AVI files (containing a video format like XviD or DivX) is stuttering, it in 90% of the files is caused by a poorly or wrongly interleaved file. The issue can be permanently resolved by RE-MUXING the AVI video-files that have this problem
Search at CommandLineFu.com from your terminal.
Get the clfu-seach at http://www.colivre.coop.br/Aurium/CLFUSearch
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"
}
It's also possible to delay the extraction (echo "unrar e ... fi" |at now+20 minutes) wich is really convenient!
The output is only partial because runtime dependencies should count in also commands executed via system() and libraries loaded with dlopen(), but at least it gives an idea of what a package directly links to.
Note: this is meaningful *only* if you're using -Wl,--as-needed in your LDFLAGS, otherwise it'll bring you a bunch of false positives.