Check These Out
replace "directory name with files to add to DVD" with actual directory containing files you want to add to growable DVD
This is a simple case of recursing through all directories, adding the '.bak' extension to every file. Of course, the 'cp $file $file.bak' could be any code you need to apply to your recursion, including tests, other functions, creating variables, doing math, etc. Simple and clean recursion.
Adjust the
$ head -c
part for password length.
I use filenames like "hans@commandlinefu.com.gpg" and a vim which automatically decrypts files with .gpg suffixes.
You can also cut charactes starting from X to N.
diff is designed to compare two files. You can also compare directories. In this form, bash uses 'process substitution' in place of a file as an input to diff. Each input to diff can be filtered as you choose. I use find and egrep to select the files to compare.
Go look at sample output first
This is kind of like the ls command but displays by modify time with size, date and color.
The newest files at the bottom of the screen (reverse using tac)
Bash has a great history system of its commands accessed by the ! built-in history expansion operator (documented elsewhere on this site or on the web). You can combine the ! operator inside the process redirection
It's only to logout all other user's except "root"
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.
This command asks for the station name and then connects to somafm, Great for those who have linux home entertainment boxes and ssh enabled on them, just for the CLI fiends out there ( I know I'm one of them ;)
Also, don't forget to add this as alias(ie alias somafm="read -p 'Which Station? "; mplayer --reallyquite -vo none -ao sdl http://somafm.com/startstream=${REPLY}.pls")