Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Re: How do I know if I can delete a file/folder?by mitd (Curate) |
on Jul 26, 2002 at 06:50 UTC ( [id://185445]=note: print w/replies, xml ) | Need Help?? |
Sorry grep I had to down vote your node because at worse is just wrong and at best its misleading.
If you are in a modern version of linux it's easyWhat 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? Try this:
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
In Section
Seekers of Perl Wisdom
|
|