commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
lsblk | grep mountpoint
PRoot is a user-space implementation of chroot, mount --bind, and binfmt_misc. This means that users don't need any privileges or setup to do things like using an arbitrary directory as the new root filesystem, making files accessible somewhere else in the filesystem hierarchy, or executing programs built for another CPU architecture transparently through QEMU user-mode. Also, developers can use PRoot as a generic Linux process instrumentation engine thanks to its extension mechanism, see CARE for an example. Technically PRoot relies on ptrace, an unprivileged system-call available in every Linux kernel.
Usage exaple cmd
echo 'Sure to continue ??'; read -n1 choi; if [ "$choi" = 'y' ] || [ "$choi" = 'Y' ]; then echo -e '\nExecuting..'; else echo 'Aborted'; fi
printTextInColorRed foo bar
foo bar [in red color]
Really helpfull when play with files having spaces an other bad name. Easy to store and access names and path in just a field while saving it in a file.
This format (URL) is directly supported by nautilus and firefox (and other browsers)
Throttle download speed
aria2c --max-download-limit=100K file.metalink
Throttle upload speed
aria2c --max-upload-limit=100K file.torrent
--max-speed=x, -s x
You can specify a speed (bytes per second) here and Axel will
try to keep the average speed around this speed. Useful if you
don?t want the program to suck up all of your bandwidth.
Image to text converter.
Convert your scanned book in image format like .png, .jpg into editable text format.
OCR ==> Optical Code Reader
xrandr --output <outputname> --brightness <value>
If the driver of your graphics card supports it, then you can use xrandr.
The following command lists the current configuration:
xrandr --current --verbose
If you want to change the configuration of an output, then you need the name of the output. This name is part of the output of xrandr --current, for example LVDS1.
The brightness can be changed like this:
xrandr --output <outputname> --brightness 0.8
xrandr --output <outputname> --gamma 0.5:1.0:1.0
Some times you may ban usb to protect thefting of your personal data.
Blacklist the usb_storage module by adding blacklist usb_storage to /etc/modprobe.d/blacklist.conf.
To load the module manually,
sudo modprobe usb_storage.
fatattr [+-hsra] [files]
The letters are...
r read only
Output of a command as input to many
Execute a process or list of commands in the given interval and output the difference in output.
Nethogs groups bandwidth by process.
Brightness indicator to be used in scripts that adjust brightness [especially sys that doesn't support automatically]
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend