Sorry grep I had to down vote your node because at worse is just wrong and at best its misleading.
in reply to Re: How do I know if I can delete a file/folder?
in thread How do I know if I can delete a file/folder?
If you are in a modern version of linux it's easy
What does 'modern linux' mean? The basic operation of *nix file permission and ownership mechanisms have been around since before my beard started turning grey.
To delete a file (in a directory you can get to) you must have write permissions for that directory.
Not complete, you must also have write permissions on the file. What if the directory is 777 but he file is 644 and owned by root or file is owned by you and is 444?
drwxrwxrwx 2 mitd mitd 4096 Jul 26 02:36 testdir
-r--r--r-- 1 mitd mitd 0 Jul 26 02:36 testdir/myfile
perl -e 'open(FILE,">myfile") or die $!'
For a more OS independant solution copy the file (cp -p) to a backup file then delete the original
'OS' dependent true but then you quote a *nix dependent command with no regard to what the ownership permissions conditions might be,
mitd-Made in the Dark
'Interactive! Paper tape is interactive!
If you don't believe me I can show
you my paper cut scars!'