To get a list of packages installed locally do this in your terminal:
dpkg --get-selections | grep -v deinstall
To save that list to a text file called packages on your desktop do this in your terminal:
dpkg --get-selections | grep -v deinstall > ~/Desktop/packages
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…