Operating System - Linux
1755164 Members
4382 Online
108830 Solutions
New Discussion юеВ

Want to delete special character directory/file

 

Want to delete special character directory/file

Hi guys,

I search file with "ls -b" command "ls -lbia" comand is not working getting error " /bin/ls: incident: Permission denied"

please sugget ,
1)how i can search inode this file?
2)how i can delete this file?
3) not sure "incident" is file/directory.

Thanks in advance.
Pratibha
6 REPLIES 6
R.K. #
Honored Contributor

Re: Want to delete special character directory/file

HI Pratibha,

What is the output of:
# ls -il
Don't fix what ain't broke
R.K. #
Honored Contributor

Re: Want to delete special character directory/file

Hi Again,

Check out for Matti Kurkela's response which is quite descriptive.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1397476

Don't fix what ain't broke

Re: Want to delete special character directory/file

:) Hi R.K. as i mension above , unable to use " "ls -lbia" also "ls -il"

Thanks
Dennis Handly
Acclaimed Contributor

Re: Want to delete special character directory/file

What directory are you in? What are the permissions of that directory?
pwd
ll -id .
bdf .

Are you root?

Re: Want to delete special character directory/file

Hi ,

This is Linux server

See below o/p
#pwd
/oravl01/oracle/11.1.0.7/log/diag/clients/user_root/host_746232775_11

#ls -lid
2043059 drwxrwxr-x 3 oracle dba 72 Jan 5 13:40 .

#ls -ab
. .. incident

#ls -l

/bin/ls: incident: Permission denied
total 0


# df -k


/dev/mapper/vg01-oravl01
30080100 28631044 1449056 96% /oravl01

seems incident is special char file/dir not sure ... unable run ls -l comand to see

this is related to database , but not in use any Data?Base.

Please sugget.

Thanks
Matti_Kurkela
Honored Contributor

Re: Want to delete special character directory/file

What is the type of the filesystem?

Please show the output of:

grep /oravl01 < /proc/mounts

Are there any indications of SCSI or other hardware errors in the "dmesg" listing?

If this is a local filesystem, the "permission denied" error may be caused by filesystem corruption: you may have to unmount the filesystem and run fsck on it. You may have to use some options (specific to the filesystem type) to run a "full check" instead of a quick check.

If the filesystem type is ext2 or ext3, the necessary commands would be:
umount /oravl01
e2fsck -C 0 -v -f /dev/mapper/vg01-oravl01
mount /oravl01

If this is a NFS, GFS or OCFS filesystem, there may be other reasons.

This thread was posted to _HP-UX_ system administration forum: I'll ask the moderators to move it to the Linux sysadmin section.

MK
MK