Archive for the ‘shell’ Category

Find broken symlinks

Posted: 24th November 2010 by Valkyrka in bash, shell

Often times you may find that your directories contain broken symlinks ( symlinks from folders which have been deleted ). In order to find broken symlinks, the following should help : find -L /home/user/public_html -type l

Print current runlevel

Posted: 6th May 2010 by Valkyrka in bash, shell

Here is how you can get the current runlevel : Sample output :

Remove comments from configuration files

Posted: 23rd April 2010 by Valkyrka in bash, one-liner, sed, shell

Here is how you can remove comments ( the ones starting with # ) from configuration files : This will remove all comments from Apache's configuration file.