Operating System - HP-UX
1833883 Members
1501 Online
110063 Solutions
New Discussion

Re: change directory to dvd fails

 
SOLVED
Go to solution
MohitAnchlia
Frequent Advisor

change directory to dvd fails

Version HP UX 11

I am little bewildered with what I am seeing. I create a directory dvd. When I run "ls" I see this directory:

drwxr-x--- 2 name group 96 Feb 27 15:52 dvd

I am the owner so I expect to atlease be able to change the directory. When I try to run "cd ./dvd" I get "sh: dvd: not found.".

Then I run rm -rf ./dvd. It runs successfully but when I run "ls". I still see dvd directory.

I also tried cd dv*, cd d* etc.

Is dvd reserved keyword or something ? Why am I not able to cd to this directory
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: change directory to dvd fails

Shalom,

dvd is not a reserved word.

If you have file system mounted on the directory dvd that would explain the behavior.

bdf, cd out of there maybe umount it

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Khashru
Valued Contributor

Re: change directory to dvd fails

you are logged in as root or your self? what is your current working directory.
MohitAnchlia
Frequent Advisor

Re: change directory to dvd fails

I tried both, I even tried login as root and also as a owner, but neither works. It just looks like something to do with the name. Could somebody try the same thing as I did and see if it works.
Dennis Handly
Acclaimed Contributor

Re: change directory to dvd fails

I had no problems with it. There may be bugs such that that the Other permissions messes up the Owner ones? Do you have ACLs? What does id(1) show?

Can you rename the directory and then try the cd? (I assume it will still fail.)
MohitAnchlia
Frequent Advisor

Re: change directory to dvd fails

When I try to rename I get:

$ mv dvd dv1
mv: dvd: cannot access: No such file or directory

This directory has sufficient permissions

When I do find . -name "dvd" It returns with no results.
MohitAnchlia
Frequent Advisor

Re: change directory to dvd fails

Here is one interesting thing. I tried cd *vd* and I could get in the directory. Then using same expression I was able to rm *vd*.

Also, what's more interesting is I again created dvd and this time I was able to cd to it.

I don't really understand what happened at that time
Pete Randall
Outstanding Contributor
Solution

Re: change directory to dvd fails

I would have to guess that you had an unprintable character in the name.


Pete

Pete
VK2COT
Honored Contributor

Re: change directory to dvd fails

Hello,

Pete is right. You should have used "-b"
flag to check directory name for
unprintable characters:

ls -alsb

That is flag I always teach in Unix classes
as students get bitten by this problem once in
a while.

Older versions of Ignite would occasionally
report errors when finding file and
directory names with unprintable characters.

Cheers,

VK2COT
VK2COT - Dusan Baljevic