System

sed: -e expression #1, char NN: invalid reference \1 on `s' command's RHS

For example, if want to change 'lNDISTINCT CHATTERING' to 'INDISTINCT CHATTERING', we may try this:

sed "s/l([A-Z])/I\1/" file.txt
which will produce the error:
"sed: -e expression #1, char 15: invalid reference \1 on `s' command's RHS"

This is because the parenthesis must be escaped thus:

sed "s/l\([A-Z]\)/I\1/" file.txt

Recover deleted files

Accidents happen and files get lost that shouldn't be. Fortunately, you have a good backup policy... don't you?

Recovering deleted files from ext filesystem

Use extundelete.

Here is a sample use of extundelete:
Assuming that the device with files to recover is /dev/sde1 which is an external storing device. Make sure there is enough space on another device (here /home/) to copy all the recovered files.


sudo mount -o remount,ro /dev/sde1 # Remount the device readonly.
mkdir ~/undelete
cd ~/undelete/

Installing and removing software and packages

This section is a stub. If you have any question, post a new ticket and this section will be completed accordingly.

Check the man pages for: apt-get, dpkg, apt-cache and dpkg-query.

dpkg command cheat sheet for Debian Linux
http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php

Performance

http://cpulimit.sourceforge.net/

cpulimit is a simple program which attempts to limit the cpu usage of a process (expressed in percentage, not in cpu time). This is useful to control batch jobs, when you don't want them to eat too much cpu. It does not act on the nice value or other scheduling priority stuff, but on the real cpu usage. Also, it is able to adapt itself to the overall system load, dynamically and quickly.

What to backup?

Many people advise not to do upgrades but to do fresh installs, reformatting / (the partition with the root directory) and keeping /home.

However, this point of view is misleading as there are many user generated files that live out of /home. Such files and settings would be lost after a fresh install.

backup

All about backups! (coming soon, with your help!)

Desktop auto login

Know your system

Most desktop managers come with a convenience setting to allow auto-login to be enabled on the computer. Thus, when powering on the computer, one does not need to login. A desktop session is automatically started.

The actual solution to achieve this depends on the display manager used on your system.

backup software

Dar

http://dar.linux.free.fr/

If you get the error message:
too large elastic buffer or elastic buffer incoherent structure
it is most likely due to a bad password. Check that you typed the password correctly. Otherwise it might be due to a corrupt media (??).

Other software

http://members.aon.at/m.koller/

Kbackup: http://www.fsarchiver.org/

Syndicate content