[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

"hidden" file in linux

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Fine Tune your automatic Updates for Ubuntu / Debian
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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
Course of the Month18 days, 3 hours left to enroll

829 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