LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Not able to access /usr/local directory (https://www.linuxquestions.org/questions/linux-newbie-8/not-able-to-access-usr-local-directory-861991/)

vinaytp 02-11-2011 03:14 AM

Not able to access /usr/local directory
 
Dear All,

I am not able to access the directory /usr/local. But when I do ls I am able to see it.

Code:

[root@indra ~]# ls -ld /usr/local
drwxr-xr-x 2 root root 0 Feb  9 12:11 /usr/local
[root@indra ~]# cd /usr/local
-bash: cd: /usr/local: No such file or directory
[root@indra ~]#

Thanks

appilu 02-11-2011 03:30 AM

hi,
Are you able to see it via GUI

vinaytp 02-11-2011 03:31 AM

Quote:

Originally Posted by appilu (Post 4254869)
hi,
Are you able to see it via GUI

Thanks for the quick reply. I do not have GUI access.

appilu 02-11-2011 03:39 AM

when you give command cd, whether your tried autocompletion via tab.
cd /us <tab>/lo<tab>

vinaytp 02-11-2011 03:43 AM

Quote:

Originally Posted by appilu (Post 4254875)
when you give command cd, whether your tried autocompletion via tab.
cd /us <tab>/lo<tab>

Yes, I tried it gives local.

Here are few set of commands executed pertaining to /usr/local

Code:

[root@indra ~]# file /usr/local
/usr/local: directory
[root@indra ~]# du -csh /usr/local
du: cannot read directory `/usr/local': No such file or directory
0      total


appilu 02-11-2011 03:50 AM

what abt this command
ls -lrt /usr/local/

vinaytp 02-11-2011 04:33 AM

Quote:

Originally Posted by appilu (Post 4254881)
what abt this command
ls -lrt /usr/local/

Output is No such file or Directory

MCD555 02-11-2011 04:40 AM

Quote:

Originally Posted by vinaytp (Post 4254855)
Dear All,

I am not able to access the directory /usr/local. But when I do ls I am able to see it.

Code:

[root@indra ~]# ls -ld /usr/local
drwxr-xr-x 2 root root 0 Feb  9 12:11 /usr/local
[root@indra ~]# cd /usr/local
-bash: cd: /usr/local: No such file or directory
[root@indra ~]#

Thanks

Your /usr/local/ seems to be empty, doesn't it?

drwxr-xr-x 2 root root 0 Feb 9 12:11 /usr/local

Try to creat e an empty file (touch /usr/locate/touchtest.out) and browse into that to check if you still facing the problem.

vinaytp 02-11-2011 05:02 AM

Quote:

Originally Posted by MCD555 (Post 4254921)
Your /usr/local/ seems to be empty, doesn't it?

drwxr-xr-x 2 root root 0 Feb 9 12:11 /usr/local

Try to creat e an empty file (touch /usr/locate/touchtest.out) and browse into that to check if you still facing the problem.

Hi,

I am not able to access /usr/local directory. How can I create a file in that ??

Sayan Acharjee 02-11-2011 05:05 AM

Quote:

Originally Posted by vinaytp (Post 4254855)
Dear All,

I am not able to access the directory /usr/local. But when I do ls I am able to see it.

Code:

[root@indra ~]# ls -ld /usr/local
drwxr-xr-x 2 root root 0 Feb  9 12:11 /usr/local
[root@indra ~]# cd /usr/local
-bash: cd: /usr/local: No such file or directory
[root@indra ~]#

Thanks

how about rebooting the system? Is it allowed?

vinaytp 02-11-2011 05:09 AM

Quote:

Originally Posted by Sayan Acharjee (Post 4254941)
how about rebooting the system? Is it allowed?

No Sayan.

Need to take downtime for that !! I hope it is deleted from corresponding inode, but when I do ls the directory still exists.

druuna 02-11-2011 05:23 AM

Hi,

Interesting.....

What is the output of the following commands:

stat /usr/local and cat /proc/mounts

vinaytp 02-11-2011 05:27 AM

Quote:

Originally Posted by druuna (Post 4254959)
Hi,

Interesting.....

What is the output of the following commands:

stat /usr/local and cat /proc/mounts

Hi Sir,

Please find the output

Code:

[root@indra ~]# cat /proc/mounts | grep usr
/dev/VolGroup00/LogVol03 /usr ext3 rw,data=ordered 0 0
auto_direct /usr/local autofs rw,fd=25,pgrp=3842,timeout=300,minproto=5,maxproto=5,direct 0 0
[root@indra ~]# stat /usr/local/
  File: `/usr/local/'
  Size: 0              Blocks: 0          IO Block: 4096  directory
Device: 1ch/28d Inode: 13821      Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2011-02-11 16:56:44.133093512 +0530
Modify: 2011-02-09 12:11:04.012398922 +0530
Change: 2011-02-09 12:11:04.012398922 +0530

Thanks

MCD555 02-11-2011 05:41 AM

Quote:

Originally Posted by vinaytp (Post 4254962)
Hi Sir,

Please find the output

Code:

[root@indra ~]# cat /proc/mounts | grep usr
/dev/VolGroup00/LogVol03 /usr ext3 rw,data=ordered 0 0
auto_direct /usr/local autofs rw,fd=25,pgrp=3842,timeout=300,minproto=5,maxproto=5,direct 0 0
[root@indra ~]# stat /usr/local/
  File: `/usr/local/'
  Size: 0              Blocks: 0          IO Block: 4096  directory
Device: 1ch/28d Inode: 13821      Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2011-02-11 16:56:44.133093512 +0530
Modify: 2011-02-09 12:11:04.012398922 +0530
Change: 2011-02-09 12:11:04.012398922 +0530

Thanks

Try also:

Code:

stat -f /usr/local

druuna 02-11-2011 05:45 AM

Hi,
Quote:

Originally Posted by vinaytp (Post 4254962)
Code:

[root@indra ~]# cat /proc/mounts | grep usr
/dev/VolGroup00/LogVol03 /usr ext3 rw,data=ordered 0 0
auto_direct /usr/local autofs rw,fd=25,pgrp=3842,timeout=300,minproto=5,maxproto=5,direct 0 0


First: I'm not too familiar with autofs and the lot, but I do believe the problem is related to it.

Your profile mentions several distro's, which one do you have this problem with?

Also: Are you using NIS or NFS?


All times are GMT -5. The time now is 07:16 PM.