Operating System - HP-UX
1819932 Members
3509 Online
109607 Solutions
New Discussion юеВ

Re: Directory with control charecters

 
SOLVED
Go to solution
Jino.P.V
Frequent Advisor

Directory with control charecters

Hi All,
I have a system with one directory INS*. I have put * because i don't know what are the letters there. I can see only INS if I list the directories. If I do ls -R, it will show the files in the directory. If I do cd /INS it will say that no directory found. I am super user and permission set is 744. Do any one has idea how we can access this directory? I cannot use cd /INS'esc'esc' or cd INS* because there is mounted filesystem with the name INSTALLER.

Thanks and regards

Jino
10 REPLIES 10
lawrenzo_1
Super Advisor

Re: Directory with control charecters

try

#mv "NIS*" NIS

this will call the directory NIS

hello
lawrenzo_1
Super Advisor

Re: Directory with control charecters

sorry ignore that type:

put

# mv "INS*" INS

as mentioned this will rename the direcotry as you do not want to call a directory with regular expressions.

hth
hello
Devesh Pant_1
Esteemed Contributor

Re: Directory with control charecters

Jino,
do you care for what is in this directory that you do not know anything about ??

If not, you can safely remove this directory by doing a
rmdir -i IN*
and when prompted for INSTALLER say n
for others say y

thanks
DP
Jino.P.V
Frequent Advisor

Re: Directory with control charecters

Hi Devesh,

My problem is that I cannot remove the files inside that. Otherwise I would have removed already. I need to see what is the content of the files which are inside. That is my problem.
I think my problem is clear now.

Thanks and regards
Florian Heigl (new acc)
Honored Contributor
Solution

Re: Directory with control charecters

ls -b will print out the letter's ascii code, I think.


-b List nonprinting characters in the octal \ddd notation.

access it using
ls INS?

(this will work unless some directory like INS1 exists, but the 'INSTALLER' won't interfere ;)
yesterday I stood at the edge. Today I'm one step ahead.
Jino.P.V
Frequent Advisor

Re: Directory with control charecters

Hi Florian,

ls -b is showing foloowing output on that directory. Could you just explain?
#ls -b
output: INS\003\003.
But if I do cd INS\003\003 it says no directory found. Do I need to convert this 003\003 to some other format? If so how?

The other option you told with "?" is not working.

thanks and regards,

Jino

Victor Fridyev
Honored Contributor

Re: Directory with control charecters

Hi,

After using ls -lb you know that there are two additional characters in the directory name. Now you can use
mv INS?? INS
in order to rename the directory or cd INS?? in order to access it.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Jino.P.V
Frequent Advisor

Re: Directory with control charecters

Yes Victor.. I got it..
Thanks florian and victor..
Devesh Pant_1
Esteemed Contributor

Re: Directory with control charecters

Jino ,
I agree with the solution above from Victor

Devesh
Jino.P.V
Frequent Advisor

Re: Directory with control charecters

I got the answer...