?
Solved

"hidden" file in linux

Posted on 2006-06-16
3
Medium Priority
?
231 Views
Last Modified: 2013-12-16
Hi,

I can run a command and it will find a file called agora.cgi:

# find . -maxdepth 1 -name \*cgi\*
./agora.cgi
./commerce.cgi
./nph-agora.cgi
./picserve.cgi
./test_id.cgi

But when I try to do -exec ls -lh {} \; it's like the file is not there:
# find . -maxdepth 1 -name \*cgi\* -exec ls -lh {} \;
find: ./agora.cgi: No such file or directory
-rwxr-xr-x    1 studebak studebak      75k Jan 29  2003 ./commerce.cgi
-rwxr-xr-x    1 studebak studebak      77k Jan 29  2003 ./nph-agora.cgi
-rwxr-xr-x    1 studebak studebak      17k Jan 29  2003 ./picserve.cgi
-rwxr-xr-x    1 studebak studebak     2.6k Feb 17  2005 ./test_id.cgi

Also if I try to remove it, the comp says it's not there:
# rm agora.cgi
rm: cannot remove `agora.cgi': No such file or directory

But then let's say I try to touch the file... the comp says it's there again... it's weird:
# touch agora.cgi
touch: creating `agora.cgi': File exists

Can anyone tell me how to delete this file?
0
Comment
Question by:bryanlloydharris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Assisted Solution

by:ravenpl
ravenpl earned 200 total points
ID: 16925835
and what simple 'ls -la' says? or find  -maxdepth 1 -name '*cgi*' -printf "'%h'\n"
Maybe there are some spaces around the name?
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 200 total points
ID: 16926133
Possible issues:

1.     File corruption. Run appropriate file system check on the partition.
2.    Try: rm -f agora.cgi  This may work?
3.     As well as ls -al for the file. Please provide lsattr for it. This will show any 'extended' file attributes that man be causing problems.

HTH:)
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 16928679
Hi,

It seems someone else may have run this program to fix it because the file is back again.  Thanks for all your help though!
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question