LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2018, 03:15 PM   #1
aravindv
LQ Newbie
 
Registered: Jul 2018
Location: India
Posts: 1

Rep: Reputation: Disabled
Unable to delete a file in my system


Hi All,

This might sound a dumb question however i am not able to delete one particular file
I use

cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME=RHEL
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Red Hat Enterprise Linux Server release 7.2 (Maipo)

One of my friend by mistake moving a file to directory he moved it as a file and now the files is created with quotes as this 'restore directory'

I tried rm -rf 'restore directory' that does not work and the file still exists.

Kindly advise as how to delete this file.

Thanks
Aravind Viswanathan
 
Old 07-23-2018, 03:22 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,800

Rep: Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002
Quote:
Originally Posted by aravindv View Post
Hi All,
This might sound a dumb question however i am not able to delete one particular file I use

cat /etc/*release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME=RHEL
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"
Red Hat Enterprise Linux Server release 7.2 (Maipo)
Red Hat Enterprise Linux Server release 7.2 (Maipo)

One of my friend by mistake moving a file to directory he moved it as a file and now the files is created with quotes as this 'restore directory' I tried rm -rf 'restore directory' that does not work and the file still exists.
Read the "Question Guidelines" link in my posting signature; basic research should be done first before posting. Since you've got a file with special characters in it, you have two choices: either escape them with a backslash (such as "rm \'restore directory\'), or use a wildcard ("rm *restore*"). The latter option should be done carefully, because it will delete ANYTHING with restore in the name.

There are MANY easily found articles about this online; and since you're using RHEL 7, you're **PAYING** for it, right??? Have you looked in their knowledgebase, or contacted them for assistance?
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unable to delete a file quintze Linux - Security 7 07-05-2016 12:14 PM
[SOLVED] Unable to delete file - Text file busy Westmoreland Linux - General 3 10-16-2013 08:49 AM
Strange file type - Unable to delete the file kk2202 Linux - General 6 08-10-2009 12:00 PM
Strange file type - Unable to delete the file kk2202 Red Hat 1 08-10-2009 08:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration