LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-27-2013, 08:48 PM   #1
stonyuk
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
File name is visible but cannot delete it or even copy its name


Has anyone face this problem?
I am trying to delete the below file and it turned up saying no such file...
But i can visibly see it. I am unable to even double click on it to capture its file name.
[root@stonyuk]# ls
CL04_<S:claimnumber:>_10200_MDRV________<S:DCN:>__21_14___EORIntra___Z.tif
[root@stonyuk]# cp CL04_<S:claimnumber:>_10200_MDRV________<S:
bash: S:claimnumber:: No such file or directory
[root@stonyuk]# ls -li
4244498 -rw-rw-r-- 1 stonyuk stonyuk 60956 Feb 23 01:10 CL04_<S:claimnumber:>_10200_MDRV________<S:DCN:>__21_14___EORIntra___Z.tif

Is this because of special characters like ':' '_' '>' etc...

Can i delete using Kill commands? Please let me know with complete commands. Thanks
 
Old 02-27-2013, 09:03 PM   #2
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,643

Rep: Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946
"kill" stops processes, it doesn't delete files.

Chances are it's due to the special characters in the name. It looks like that's the only file in the directory, so can you use tab completion to handle all of the "special" characters? Just type
Code:
rm CL04<tab>
of course replacing <tab> with actually pressing the Tab key. The tab completion will handle delimiting all of the special characters that require it.

Alternatively, you can put it in quotes to prevent the shell from interpreting the special characters that are part of the filename:
Code:
rm 'CL04_<S:claimnumber:>_10200_MDRV________<S:DCN:>__21_14___EORIntra___Z.tif'

Last edited by suicidaleggroll; 02-27-2013 at 09:07 PM. Reason: added quote option
 
1 members found this post helpful.
Old 02-27-2013, 09:31 PM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Mageia Studio-13.37 Kubuntu.
Posts: 3,325
Blog Entries: 33

Rep: Reputation: 199Reputation: 199
Quote:
Hi, Welcome to LQ!

LQ has a fantastic search function that may save you time waiting for an answer to a popular question.

With over 4 million posts to search it's possible the answer has been given.
Quote:
Is this because of special characters like ':' '_' '>' etc...
I think it could be.

Have you tried "" encapsulating the string in single or double quotes?

I think the : , bash expects a parameter, based on the last string, it might not be a command.

Cheers

Last edited by GlennsPref; 02-27-2013 at 09:42 PM. Reason: spell
 
Old 02-27-2013, 09:36 PM   #4
stonyuk
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks suicidaleggroll,

By pressing the tab on it showed me a different file name similar to the original file name but with extra '/'.

rm CL04_\<S\:claimnumber\:\>_10200_MDRV________\<S\CN\:\>__21_14___EORIntra___Z.tif

I removed it successfully. Thanks for everyone too.

Last edited by stonyuk; 02-27-2013 at 09:47 PM.
 
Old 02-27-2013, 09:44 PM   #5
suicidaleggroll
Senior Member
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 2,643

Rep: Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946
Glad it worked for you. If you're satisfied with the answers provided and your problem has been solved, please click the "Yes" under "Did you find this post helpful" for the relevant answers and then mark the thread as "Solved" under "Thread Tools" at the top of the thread. This lets the contributors here know which threads still require assistance and which have been resolved.

Last edited by suicidaleggroll; 02-27-2013 at 09:45 PM.
 
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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cscope usage options not visible, but the search results are visible balemarthy Linux - Newbie 1 02-15-2012 02:46 PM
file not visible file,that touched from by another nfs client guoqing75 Linux - Server 1 01-14-2012 12:59 PM
how to copy some lines in a file and delete these lines after gartura Linux - General 1 07-20-2010 08:55 AM
Can I safely copy one partition to another and delete the first? Excalibre Linux - Newbie 3 06-28-2008 12:35 AM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM


All times are GMT -5. The time now is 05:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration