about killing a process
- Sometimes a process don't like to be killed, then you should try
kill -9 $PID
- If it is still running, it could be a zombie; check
ps -aux and look in the
STAT category for a
z, which indicates the zombie nature of the process. Here, only a reboot helps.
- Killing a process by its name works with
- Crop an image to the size 200x300 starting at the position 50, 100 (don't forget the parameter +repage otherwise you will get a white border (passepartout)):
convert original.png -crop 200x300+50+100 +repage new.png
- Before you start removing old kernel version, check which versions are installed:
sudo dpkg -l | grep linux-image
To remove an old version, e.g. 2.6.32-23-generic, type
sudo apt-get remove --purge linux-image-2.6.32-23-generic
To really remove everything from that kernel version, you should run
sudo apt-get autoremove
- If you are using a Debian-based system like Ubuntu, you are getting more and more packages which are
are saved on your harddrive. To get rid of old packages (deb-files)
that cannot be downloaded any longer (because there are newer versions) you can use:
sudo apt-get autoclean
To remove every deb-file on your system type
sudo apt-get clean
- Assume that you are working in a shell on a server and you want to tell your colleague, who is also logged into that particular server, that it is time for a coffee. A very efficent way doing this is using the write command.
- First you have to check who is logged into to which terminal, type
and you will get an info similar to DieterMiete pts/12 2010-01-04 03:17 (:42.0)
- Contact your colleague by typing
write DieterMiete pts/12
- Now you can type whatever you want, for example
time for coffee!
and by hitting enter this message is send to your colleague's terminal. If you're done, simply hit CTRL+D.
- You can also use cat to redirect a file to him:
cat file.txt | write DieterMiete pts/12
- If you want to send you coffee break announcement to everybody type:
cat announcement.txt | wall
It is also possible to simply type wall, then you can start writing your message according to the command write.