Put this in a script and run it:
#!/bin/bash
gconftool-2 -s -t bool /apps/metacity/general/resize_with_right_button true
gsettings set org.gnome.desktop.wm.preferences resize-with-right-button true
The gconftool-2 line is for GConf based systems, and gsettings is its newer replacement.
Source: myunster.com
In order to update « locate » database on OS X, some people suggest create a symlink:
sudo ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
However, this method can create an erroneous output if you are in directory with specific permission e.g.
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
find: .: Permission denied
The better method would be create a bash script /usr/bin/updatedb:
#!/bin/bash
pushd . > /dev/null
cd /usr/libexec
echo "Updating locate database..."
sudo ./locate.updatedb
echo "Updating complete!"
popd > /dev/null
Make it executable: sudo chmod +x /usr/bin/updatedb
Now you can just run «sudo updatedb», in order to update «locate» database.
Source: nixCraft
Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems.
Finding CPU utilization is one of the important tasks. Linux comes with various utilities to report CPU utilization. With these commands, you will be able to find out:
* CPU utilization
* Display the utilization of each CPU individually (SMP cpu)
* Find out your system’s average CPU utilization since the last reboot etc
* Determine which process is eating the CPU(s)
Old good top command to find out Linux cpu load
The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.
The top command monitors CPU utilization, process statistics, and memory utilization. The top section contains information related to overall system status – uptime, load average, process counts, CPU status, and utilization statistics for both memory and swap space.
Top command to find out Linux cpu usage
Type the top command:
$ top
Output:

You can see Linux CPU utilization under CPU stats. The task’s share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time. In a true SMP environment (multiple CPUS), top will operate in number of CPUs. Please note that you need to type q key to exit the top command display.
The top command produces a frequently-updated list of processes. By default, the processes are ordered by percentage of CPU usage, with only the « top » CPU consumers shown. The top command shows how much processing power and memory are being used, as well as other information about the running processes.
Lire la suite…
Ce document rappelle les commandes et les options les plus utilisées par l’administrateur d’un système Linux. Il s’agit surtout de commandes assez générales, dont tout administrateur aura besoin un jour ou l’autre. Les commandes pour l’utilisateur courant se trouvent dans un autre aide-mémoire. Pour plus d’informations, on consultera les pages de manuel ou les publications du Linux Documentation Project
Une version prête à l’impression recto-verso est disponible pour conserver cet aide-mémoire dans un format facile à ranger dans un tiroir ou sous un clavier.
Informations système
uname – Identification du système.
-a : toutes les informations.
dmesg – Messages du noyau (et ceux du boot).
uptime – Durée et charge du système.
free – Occupation de la mémoire.
vmstat – Détails sur l’utilisation de la mémoire.
ipcs – Utilisation des ressources IPC System V.
ipcrm – Suppression de ressources IPC System V.
ldconfig – Valider les bibliothèques dynamiques.
init – Changement de niveau de fonctionnement :
- 0 : arrêt.
- 1 : mono-utilisateur,
- 3 : multi-utilisateurs mode texte,
- 5 : multi-utilisateurs mode graphique,
- 6 : redémarrer.
Utilisateurs
useradd – Ajout d’un utilisateur :
useradd -m -p "" linus
crée un compte linus, avec répertoire personnel et mot de passe vide.
Lire la suite…