Strang Directory $external_c and $internal_c

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Strang Directory $external_c and $internal_c

Unread post by DarkF@der »

Hello,

A client of us seems to have some strangs directory's
I can't acces them with root acces......

ls -la /var/www/vhosts/xxxxxxxxxxxxxxxx.com/httpdocs

drwxrwxrwx 3 webmaster psacln 4096 Jan 23 11:38 $external_c
drwxrwxrwx 3 webmaster psacln 4096 Feb 3 22:15 $internal_c

if i want to acces them like cd $external_c i got redirected to my /root dir :?
I can't acces it or look inside the directory's
How the acces these directory's in linux or deleet these directory?


Thanks in advanced
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Strang Directory $external_c and $internal_c

Unread post by mikeshinn »

$ tells the shell that this is a variable, and since the variable is empty its throwing you back to /.

So, the solution is to escape the $ by using the \ meta-character to tell the shell that its a literal character. For example:

cd \$external_c
DarkF@der
Forum Regular
Forum Regular
Posts: 313
Joined: Thu May 07, 2009 12:46 pm

Re: Strang Directory $external_c and $internal_c

Unread post by DarkF@der »

Thank you :D
Post Reply