How do I delete this file in Linux

I'm not very well versed in Linux so this one has me puzzled. Deleting a file is simple enough but this isn't a normal file and I need to delete it. In the directory listing the file is

-rw-r----- 1 ossec ossec  11081 Jun  7 09:04 (WIN-WORKSTATION) 192.168.1.45->syscheck

How do I delete this file?
LVL 21
Russ SuterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Seems it is a quite "normal" file, but with a very strange name, indeed!

At first sight one could assume that it's a "soft link" (a directory entry pointing to another directory entry) due to the "->" characters, but such files are marked by the letter "l" in the very first column of the output of "ls -l", like this:
"lrw-r----- 1 ossec ossec  11081 Jun  7 ... ... "

Remove that troublemaker this way (as user "ossec" or user "root"):

rm '(WIN-WORKSTATION) 192.168.1.45->syscheck'

Please note the single quotation marks ( '  '  ) around the filename!

If you you're not allowed to log in as "root" or "ossec" the above will give a "not allowed" message. In this case try prefixing "rm" with "sudo":

sudo rm '(WIN-WORKSTATION) 192.168.1.45->syscheck'

Maybe you're allowed to use "rm" with "sudo".
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
R. Toby RichardsNetwork AdministratorCommented:
If woolmilkporc's suggestion doesn't work, then try this first:

sudo /etc/init.d/ossec stop

The file may be in use by the ossec daemon.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.