Check These Out
in Debian-based systems apt-get could be limited to the specified bandwidth in kilobytes using the apt configuration options(man 5 apt.conf, man apt-get). I'd quote man 5 apt.conf:
"The used bandwidth can be limited with Acquire::http::Dl-Limit which accepts integer values in kilobyte. The default value is 0 which deactivates the limit and tries uses as much as possible of the bandwidth..."
"HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and proxy options are the same as for http..."
Test scenario:
* Open xterm (or konsole, ...)
* Start xeyes with: ( xeyes & )
* Close the xterminal
The xeyes process should be still running.
The --parents option will cause cp or mkdir to automatically create the parent directory structure.
$mkdir --parents /one/two/three/dir
will create /one, /one/two, and /one/two/three as needed before creating dir. cp will copy files with their full directory structure into the target directory with this option.
Thanks to Peter Leung at:
http://linuxcommando.blogspot.com/2007/11/use-of-parents-flag-in-mkdir-and-c.html
which has good examples of usage.
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"
}
Another option is openssl.
Scan for open ports on the target device/computer (192.168.0.10) while setting up a decoy address (192.168.0.2). This will show the decoy ip address instead of your ip in targets security logs. Decoy address needs to be alive. Check the targets security log at /var/log/secure to make sure it worked.
This is probably overkill, but I have some issues when the directories have spaces in their names.
The
$ find . -type d -print0 | while read -d $'\0' dir; do xxx; done
loops over all the subdirectories in this place, ignoring the white spaces (to some extend).
$ cd "$dir"; echo " process $dir"; cd -;
goes to the directory and back. It also prints some info to check the progress.
$ find . -maxdepth 1 -name "*.ogg.mp3" -exec rename 's/.ogg.mp3/.mp3/' {} \;
renames the file within the current directory.
The whole should work with directories and file names that include white spaces.