Results 1 to 4 of 4
Hi, I am trying to clean out an entire website (multiple installations) that has been configured with macromedia contribute. Said software has created thousands of LCK files (lock files). I ...
- 02-26-2007 #1Just Joined!
- Join Date
- Aug 2006
- Posts
- 6
rm command for entire website
Hi, I am trying to clean out an entire website (multiple installations) that has been configured with macromedia contribute. Said software has created thousands of LCK files (lock files). I want to use the rm command to remove every *.LCK file in every directory and subdirectory but it does not seem to work, the format I am trying is:
rm -fR /home/mydomain/public_html/*.LCK
is this correct or is there a simpler way to do this
EDIT: I have since found the solution, I apologise, I should have googled harder before posting but I will edit and include the solution as it may be useful to someone.
find . -type f -name "*.LCK" -exec rm -i {} \; - With confirmation
find . -type f -name "*.LCK" -exec rm -f {} \; - Without confirmation
- 02-26-2007 #2
Try the following
Code:$find /home/mydomain/public_html/ -name "*.LCK" -exec rm '{}' \;
- 02-26-2007 #3Just Joined!
- Join Date
- Aug 2006
- Posts
- 6
thanks Daark, lol, you must have replied as I was editing the post. Many thanks indeed. I seem to be inundated with helpfull friends since venturing into the linux world.
- 02-26-2007 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
That should work ( I think it should be a lowercase 'r' though as the switch). A cleaner way would be to run
This will only run against .LCK files so it should give you a little piece of mind. If you are going to do anything like this it is always a good idea to backup first!Code:find -iname *.LCK -exec rm {} \;
EDIT - Beaten to it!


Reply With Quote