Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

james1758

macrumors regular
Original poster
May 26, 2013
196
11
UK
Hi all,

Long story short I have a file on my mac that needs to be locked and never accidentally thrown away. I currently don't need it but may do in 6 months or 2 years... who knows!

I discovered a few days ago that when trying to move a file from Apple's desktop pictures to the trash I needed to put in my password to do so. Also if I tried to move the file to another folder then the original would always stay where it was and a copy would simply end up in the other folder. Extrememly useful I thought!
Screen Shot 2014-08-02 at 00.13.44.png

However, I can't seem to find how to do that with my own files? If somebody knows how to lock one of my files like apple seem to have done with theirs it would be appreciated.

Cheers,
James :D
 

Tumbleweed666

macrumors 68000
Mar 20, 2009
1,761
141
Near London, UK.
Some random thoughts
Is this file backed up? Otherwise it may be academic if you look for it in two years and it hasn't survived a computer catastrophe that happened previously.
The reason a copy is made is likely due to it moving from one disk to another rather than it being locked to a location.
If you have a second user on the mac (and if you don't, create one) then give the file to that user. Or indeed move the file to their documents area and then go back to your normal user, that way you are never going to accidentally touch it with some wider command such as deleting a folder forgetting its in there.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
You can use chflags Terminal command to set the file to system immutable, you will then get requested for password if you try to trash or overwrite the file.

Code:
sudo chflags simmutable /path/to/file

And to turn it off

Code:
sudo chflags noschg /path/to/file
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.