what is the script command for /etc on ubuntu

66 Views Asked by At

i need to access /etc through script command in ubuntu. for example, home is ${user.home} and tomcat home is ${catalina.home}, if i wanted to access /etc what should it be? also if i wanted to access a custom folder under /etc, how should i do it? do i have to set up an environment variable to access it?

thanks in advance....

2

There are 2 best solutions below

0
On

I would declare another variable ${xxxservice.etc} because you never know when someone (or some distribution group) will have moved your configuration (etc) directory to some other location other then "/etc".

My 2 cents.

1
On

No need to use a variable, just use "/etc". All *nix systems have it, it's pretty much guaranteed to exist.