LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-29-2017, 05:32 PM   #1
ansz
LQ Newbie
 
Registered: May 2017
Posts: 3

Rep: Reputation: Disabled
Can't remove a file under home/user location #filename#


Hello,

I'm new to Linux and I'm trying to remove a file under home/user location. The file appears as #filename#

I don't know how the file appeared here. I have another file in the same location with a similar description but not in between ##.

Thank you!
 
Old 05-29-2017, 05:46 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
did you try opening a file manger and right clicking on it then selecting delete? (or move to trash)
 
1 members found this post helpful.
Old 05-29-2017, 05:46 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
What is the name of the file? That way we can determine how it ended up there before you delete it.

You should be able to delete it with:

Code:
rm '#filename#'
but it would be useful first to find out if it is open under a running process.
 
1 members found this post helpful.
Old 05-29-2017, 06:05 PM   #4
ansz
LQ Newbie
 
Registered: May 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up Got it.

Why did this happen? The file created in between ##?

I tried first with

rm -rf \#filename#

and it worked.

Thanks for your suggestion anyway. Could you explain more specifically your suggestion?

Thanks in advanced.
 
Old 05-29-2017, 06:09 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148Reputation: 2148
I find strange files in my home as well. little dust bunnies they are. Usually it is because of another app/program that creates them. I usually open them up to see if it will give me more information.
 
1 members found this post helpful.
Old 05-29-2017, 06:09 PM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
Quote:
Originally Posted by ansz View Post
Why did this happen?
What was the name of the file?
 
Old 05-29-2017, 06:12 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
Quote:
Originally Posted by ansz View Post
Could you explain more specifically your suggestion?
If it was my suggestion that you're referring to, the single quotes stop the shell interpreting the # symbol.
 
1 members found this post helpful.
Old 05-29-2017, 06:23 PM   #8
ansz
LQ Newbie
 
Registered: May 2017
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up

The file name was

salsichas

Perhaps I had a space before...
This file was edited with nano, vi and emacs, and since I'm new to this I might have done something wrong.
 
Old 05-29-2017, 06:30 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916Reputation: 2916
Quote:
Originally Posted by ansz View Post
The file name was

salsichas

Perhaps I had a space before...
This file was edited with nano, vi and emacs, and since I'm new to this I might have done something wrong.
Bingo. It was an emacs autosave file:

https://www.emacswiki.org/emacs/AutoSave

http://snarfed.org/gnu_emacs_backup_files
 
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] How can i change my HOME (/home/user) directory location to something else? QueenZ Linux - Newbie 6 08-05-2010 06:26 AM
How to remove bad filename pattern from every file in one folder? jaytd Linux - Newbie 3 07-16-2009 02:55 AM
Upgrade 6->8: Could not open location 'file:///home/user' brianmcgee Fedora 4 11-20-2007 02:08 PM
Remove file location from bash line okos Linux - Newbie 5 10-30-2007 02:46 AM
changing user's default ftp home location GraemeK Linux - Networking 0 12-31-2003 12:11 PM

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

All times are GMT -5. The time now is 06:51 AM.

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