Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

"hidden" file in linux

Posted on 2006-06-16
3
Medium Priority
?
232 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

610 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