Check These Out
Shows all block devices in a tree with descruptions of what they are.
This command puts all the flags of the USE variable actually used by the packages you emerged to the file "use", and those which are unused but available to the file "notuse"
Installs pip packages defining a proxy
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"
}
If the return code from the last command was greater than zero, colour part of your prompt red. The commands give a prompt like this:
[user current_directory]$
After an error, the "[user" part is automatically coloured red.
Tested using bash on xterm and terminal. Place in your .bashrc or .bash_profile.
This command will copy a folder tree (keeping the parent folders) through ssh. It will:
- compress the data
- stream the compressed data through ssh
- decompress the data on the local folder
This command will take no additional space on the host machine (no need to create compressed tar files, transfer it and then delete it on the host).
There is some situations (like mirroring a remote machine) where you simply cant wait for a huge time taking scp command or cant compress the data to a tarball on the host because of file system space limitation, so this command can do the job quite well.
This command performs very well mainly when a lot of data is involved in the process. If you copying a low amount of data, use scp instead (easier to type)
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.
This assumes you have the 'rpm', 'rpm2cpio' and 'cpio' packages installed. This will extract the contents of the RPM package to your current directory. This is useful for working with the files that the package provides without installing the package on your system. Might be useful to create a temporary directory to hold the packages before running the extraction:
$ mkdir /tmp/new-package/; cd /tmp/new-package
Improved google text-to-speech function. Allows to specify language, plays sound in terminal. Automatically removes downloaded file after successfully processing.
Usage:
$ say LANGUAGE TEXT
Examples:
$ say en "This is a test."
$ say pl "To jest test"