Categories
Computing HowTo Linux

How to remove a symbolic link and the file it targets

ls -al NameOfFile | awk ‘{print “rm “$9”; rm “$11}’

The above command will show you what is to be removed

ls -al NameOfFile | awk ‘{print “rm “$9”; rm “$11}’ | sh -x

Piping the output into sh -x will execute the commands and remove both the source and the target. Be certian you want to do this!

Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.