Find out which process is using that file you can't move/delete
Easy!
If you know how. Run this in a terminal:
Might want to run it with 'sudo' if it doesn't give any results, the process using it might be owned by root or another user whose processes you don't have access to.
It even works with files that are located in the Trash! Simply drag the file from the Trash to the terminal window to get the path to the trashed file in the terminal.
If you know how. Run this in a terminal:
Code:
lsof <path of the file you are having trouble with>Might want to run it with 'sudo' if it doesn't give any results, the process using it might be owned by root or another user whose processes you don't have access to.
It even works with files that are located in the Trash! Simply drag the file from the Trash to the terminal window to get the path to the trashed file in the terminal.
How to define where iCal sends its e-mails from?
That was a question I had this morning. Took quite some Googling to figure this out... A very large number of people had asked the question of how to change the address the e-mails got sent to. That was easy and actually logical to figure out (look at your own contact information in Address Book).
Now, changing where iCal sends messages from? The messages I got almost all came from different e-mail addresses.
Then I found it! iCal sent its messages from the account that has been selected last in Mail (or has been defined as the default from address for Mail).
Who came up with that?! To me, it seems far more logical to define a different from address for every calendar defined in iCal...
Now, changing where iCal sends messages from? The messages I got almost all came from different e-mail addresses.
Then I found it! iCal sent its messages from the account that has been selected last in Mail (or has been defined as the default from address for Mail).
Who came up with that?! To me, it seems far more logical to define a different from address for every calendar defined in iCal...
Random forum avatars - part two
Tonight, Twitter user Chris Smith suggested using redirect headers instead of using GD to render the image.
This didn't even occur to me, when I started with this idea. It is much more elegant and does not need the GD library. Continue reading to see the new code!
This didn't even occur to me, when I started with this idea. It is much more elegant and does not need the GD library. Continue reading to see the new code!
Random forum avatars
Random forum avatars
Today I felt like changing my avatar on one of the forums I frequently visit. I then thought it would be fun if I could have a random avatar, chosen from a directory on my server.
After about half an hour of experimenting and Googling I came up with something that works reasonably well. The only thing I need to look at is the increased JPEG compression that is very visible in the images, after they've been through the PHP script.
Continue reading for my code.
Today I felt like changing my avatar on one of the forums I frequently visit. I then thought it would be fun if I could have a random avatar, chosen from a directory on my server.
After about half an hour of experimenting and Googling I came up with something that works reasonably well. The only thing I need to look at is the increased JPEG compression that is very visible in the images, after they've been through the PHP script.
Continue reading for my code.