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.
The iPhone
A few months ago, I got an iPhone 3GS from work. Quite a revelation, it really is a very good phone (and overall media device). This week I replaced my own phone with an iPhone 4.
I might be getting old (or am I just starting to grow up?), but I really don't understand all the hype on the iPhone 4 over the 3GS.
Things I've noticed so far:
- Better screen
- Sleeker looks
- Better buttons
Besides that, the phones and the experience with both phones are really very similar. Identical, even. To me the iPhone 4 doesn't even 'feel' any faster than the old 3GS.
Oh, also: the glass and metal housing of the 4 feels really cold in your hand where the plastic of the 3GS feels warm and even though the 4 is only a few grams heavier than the 3GS, it feels much heavier in my hand.
I do like how iTunes synchronizes both phones, though I don't understand why the app-groups aren't synchronized. I suddenly had six pages filled with apps and had to spend over half an hour sorting them back in to groups.
I might be getting old (or am I just starting to grow up?), but I really don't understand all the hype on the iPhone 4 over the 3GS.
Things I've noticed so far:
- Better screen
- Sleeker looks
- Better buttons
Besides that, the phones and the experience with both phones are really very similar. Identical, even. To me the iPhone 4 doesn't even 'feel' any faster than the old 3GS.
Oh, also: the glass and metal housing of the 4 feels really cold in your hand where the plastic of the 3GS feels warm and even though the 4 is only a few grams heavier than the 3GS, it feels much heavier in my hand.
I do like how iTunes synchronizes both phones, though I don't understand why the app-groups aren't synchronized. I suddenly had six pages filled with apps and had to spend over half an hour sorting them back in to groups.
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.