Mac OS X

Mac OS X: Deleting a Resource Fork

HFS+ and resource forks.  Still a necessary evil.  At times I find that I need to remove a resource fork from the command line, leaving the file otherwise in tact. To do so, first create an empty file.  In this case I’ll create a file using touch called todelete, so I remember to delete it: 

touch todelete

Now we’re going to copy this empty file over the resource fork for the file myvideo.mov using the cp command:

cp todelete myvideo.mov/rsrc

At this point, we can clean up the original file we created previously using rm:

rm todelete