Check These Out
Last listed files presumably have higher precedency then files listed first, i.e. configuration files in the personal .config directory will be listed last and their config parameters will be more authoritative then default config parameters defined in /etc directory which are usually listed above them.
If you replace ".conf" with ".ini" in the command, initial files will be listed instead of config files.
If you do not like to list multiple access to the same config file, pipe to "uniq" or "uniq -c" to prefix lines by the number of occurrences
And then to complete the task:
Go to target host;
$ssh host
Turn everything off:
$for i in `chkconfig --list | fgrep :on | awk '{print $1}'` ; do chkconfig --level 12345 $i off; done
Create duplicate config:
$while read line; do chkconfig --level $line on; done < foo
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
Using the sed -i (inline), you can replace the beginning of the first line of a file without redirecting the output to a temporary location.
Often you find some tty programs are messed up and confused about character encoding - 'man' is a common problem and sometimes displays weird characters for apostrophes, hyphens etc etc. Another class of programs that suffer from this are those that try to use the line drawing characters - eg RedHat's tty system admin functions such as system-config-firewall-tui system-config-network-tui etc.
Adding 'LC_ALL=C' fixes most of these problems (as long as you want English! Perhaps speakers of other languages can add a comment here).
For bonus points, I've added the '-c' option to the man command so that it ignores it's cache and re-computes the man page using the C locale.
Preserve file structure when coping and exclude some file o dir patterns
This example will close the pipe after transferring 100MB at a speed of 3MB per second.
You can use "decode()" in a similar manner:
$ python -c 'print "68656c6c6f".decode("hex")'
Brute force way to block all LSO cookies on a Linux system with the non-free Flash browser plugin. Works just fine for my needs. Enjoy.