CLI tip: Go back to the previous directory

While in Terminal, going back to the previous directory can be done with the classic cd ..But there’s another way. make an alias of you choice for cd $OLDPWD, like this: alias cdo=’cd $OLDPWD’ Now every time you’ll tipe cdo you’ll be taken to the previous directory you were in. This is very useful when… Read More »

Find all world-writable files

If you are an administrator and have users on your server, keeping files with limited permissions should be a priority. To seek out all world-writable files on your machine, do a simple find / -perm -2 ! -type l -ls

A history of your Linux reboots

It’s easy to find out when were the last 30+ times you rebooted your Linux PC. Do a last reboot to get a list of exact dates: reboot   system boot  2.6.27-7-generic Tue Nov 25 09:12 – 11:17  (02:04) reboot   system boot  2.6.27-7-generic Mon Nov 24 15:54 – 01:06  (09:11) reboot   system boot  2.6.27-7-generic Mon Nov… Read More »

Ctrl+Alt+Delete your own way

Do you by any chance wish to modify the behavior of Ctrl+Alt+Delete? Change the following line in /etc/inittab: ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now Comment it out with # to disable Ctrl+Alt+Del altogether or replace the /sbin/shutdown -t1 -a -r now part with a command of your choice. This way you can first unmount NAS shares… Read More »