background preloader

UNIX

Facebook Twitter

Learn the DD command. This post contains comprehensive documentation with examples for one of the most useful Linux/UNIX/Windows commands: dd.

Learn the DD command

Dd is a bit-stream duplicator. If you have questions, post them. The latest addition, How To Encrypt an 8.0 GB SDHC MicroSD Card was on 06-19-2011. First Time visitors please reply. How To Encrypt an 8.0 GB SDHC MicroSD Card Put the card into an USB adapter. Code: ls /dev/sd* /dev/sdb /dev/sdb1 Write random data to the drive: dd if=/dev/urandom of=/dev/sdb bs=4k /dev/sdb is only an example. apt-get install cryptsetup Learn to use parted, or I quit!

Cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1 Open the encrypted device: cryptsetup luksOpen /dev/sdb1 vol_1 Create a filesystem: mkfs.xfs -imaxpct=3 /dev/mapper/vol_1 Mount: mkdir /AES_Drive && mount /dev/mapper/vol_1 /AES_Drive Umount: umount /AES_Drive && cryptsetup luksClose /dev/mapper/vol_1 Just a footnote, Laptops that went to sleep with the encrypted volume open, may wake up with it open! Warning!! #! And so on. Again. The Shopt Builtin - Bash Reference Manual. Toggle the values of variables controlling optional shell behavior.

The Shopt Builtin - Bash Reference Manual

With no options, or with the -p option, a list of all settable options is displayed, with an indication of whether or not each is set. The -p option causes output to be displayed in a form that may be reused as input. Other options have the following meanings: If either -s or -u is used with no arguments, the display is limited to those options which are set or unset, respectively. Unless otherwise noted, the shopt options are disabled (off) by default. The return status when listing options is zero if all are enabled, non-zero otherwise. Autocd If set, a command name that is the name of a directory is executed as if it were the argument to the cd command. Cdable_vars If this is set, an argument to the cd builtin command that is not a directory is assumed to be the name of a variable whose value is the directory to change to. cdspell checkhash checkjobs checkwinsize cmdhist compat31 compat32 compat40 compat41 dirspell dotglob execfail.

Using Bash's History Effectively. Using Bash's History Effectively I will attempt here to focus on only one feature of Bash, its command history.

Using Bash's History Effectively

There are other good documents on the other features of Bash. If you're interested in anything other than the command history/recall, then this document really isn't going to fulfill your needs. Okay, so let's get into it! What is Bash? So, Bash is GNU software and all that that implies (GPL, free, reliable, etc.). The last feature mentioned as one of the major selling points of Bash is "recall". While completion (feature #2) alleviates much of the pain associated with entering long commands and deserves an entire presentation unto itself (stay tuned), completion also adds to the problem in a way, by making longer commands more acceptable.

There's also the advent of long options, prevalent in the GNU world. Then, of course, there's always the endless stringing together of commands with pipes (|) to make mini programs (my personal favorite). export HISTIGNORE="&:ls:[bf]g:exit"