Hi, you can check if the directory containing the file is writable, if it isn't then you can't create a file. Greetz Peter On 11/11/05, Peper wrote: > > Hello, > How can i check whether i can create or overwrite a file? > > For example: > If /etc/conf.d/net cannot be overwritten or created it return false. > > Overwriting test would be -w /etc/conf.d/net, but how can i check if i can > create this file? I could check whether i can create new files > in /etc/conf.d, but how can i get /etc/conf.d/ from /etc/conf.d/net ? > > -- > Best Regards, > Peper > -- > gentoo-user@gentoo.org mailing list > > -- I have plenty of common sense, I just choose to ignore it. --- Calvin