How to remove attributes of a file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to remove attributes of a file?
# 1  
Old 07-03-2014
Linux How to remove attributes of a file?

Hello,
I opened a file by accident (with a java program, which has been uninstalled!) and from then on, all the file with .fasta extension has been changed with an icon (So annoying!!) and the file attributes has been changed with the property:
Code:
Type: application/x-wine-extension-fasta type (application/x-wine-extension-fasta)

I have changed the file property to be opened by gedit, but the icon is still linked to the file. The problem seems related to the file MIME, but not quite sure.
Spent hours searching, no solution yet.
How to remove this annoying attributes? Thanks!
# 2  
Old 07-03-2014
What's your system? What's your WM?
# 3  
Old 07-03-2014
Quote:
Originally Posted by yifangt
and from then on, all the file with .fasta extension has been changed with an icon (So annoying!!) and the file attributes has been changed with the property
I suppose you talk about some kind of Linux(?) desktop. If yes: a little hint as to which one you talk about might help. My crystal ball is in repair right now, so i cannot see what you have installed on your system.

Every desktop has some sort of declaration list which attributes make for a certain kind of file. Usually this attribute is some kind of extension, in your case most probably ".fasta". You probably have linked this extension with the type you talk about. I suppose you can change that by right-clicking such a fasta-file, select something like "open with custom application" and then select "Remember this selection for files of this type".

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 4  
Old 07-03-2014
My system is Linux 3.5.0-49-generic #74-Ubuntu SMP Fri May 2 23:28:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux And I am using Cinnamon desktop with gnome WM. I have tried the bakunin's methods, which did not work.
# 5  
Old 07-04-2014
Try to unassociate .fasta file types in ubuntu. You can do that in the file default.list.
Try to run a find command to get the file and change the .fasta entry
This User Gave Thanks to SriniShoo For This Post:
# 6  
Old 07-04-2014
Thanks for all your replies!
Googled more and from ubuntuforums.org and askubuntu.com got some clues there about file associations which is located in $HOME/.local/share. Then I tried to change some of the files related to .fasta and remove those entries related to wine that has been uninstalled.
This may not be the accurate solution, but solved the annoying problem.
Code:
vim ~/.local/share/applications/mimeapps.list         # delete those lines related to .fasta extension or wine
vim ~/.local/share/applications/mimeinfo.cache        # delete those lines related to .fasta extension or wine
vim ~/.local/share/applications/mimeapps.list        # delete those lines relate to .fasta extension or wine
rm -r ~/.local/share/icons/hicolor/           # bunch of folders that all contains info about .fasta extension or wine related
rm -r ~/.local/share/icons/                   # bunch of folders that all contains info about .fasta extension or wine related
rm -r ~/.local/share/applications/wine/        # wine is uninstalled so delete this folder,

# 7  
Old 07-04-2014
Next time mention you're on Ubuntu from the first Smilie Glad it's fixed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

File attributes ????

I'm trying to sort out the charing of a problem folder, in the 'ls -l' list is shows as: d???????????? ? ? ? ? ? Pi-Share PiShare is the name of the directory, all the ??s make no sense to me at all, and no user (there are only two, pi and root) can make any changes to it.... (4 Replies)
Discussion started by: MuntyScrunt
4 Replies

2. Solaris

Split file based on multi valued attributes

Hi, I am new to shell scripting. I have a file which has multi valued attributes. I wanted to split it so that there will be no muliti valued attributes. Example file: "attr1","amv1;amv2;3","bmv1;bmv2","abc","abc1;abc2;abc3" Plz note this is CSV file and ; is the delimiter for multi valued... (7 Replies)
Discussion started by: snukala
7 Replies

3. Shell Programming and Scripting

Using cp: preserving file/folder attributes and auto creating folders

Hi, Is there a way to use cp in such a way that when a file is copied to a destination, the required destination folders are automatically created with the proper permissions, and the resulting copied file has the same attributes as the original. For example if I copied... (1 Reply)
Discussion started by: pcwiz
1 Replies

4. Shell Programming and Scripting

Generate the File Attributes in the system

Hello Folks, I want to generate the file attributes of the system and needs to write into the text file. I am running the command "ls -Rl" to get the details of the files from the current directory. I am getting the output. ./linux-2.6.29.4/arch: total 10 drwxr-xr-x 9 1138 5000 ... (3 Replies)
Discussion started by: saurabhchokshi
3 Replies

5. UNIX Desktop Questions & Answers

file attributes and exception

hi, I want to know the date the file was created or modified. I can do this using ls, ll -ltr etc... I want to do this in a function (so If the file date is older then a week I can report it), is there a way? another thing... In sql function, I can catch exceptions, is there a way to do this... (1 Reply)
Discussion started by: krem
1 Replies

6. Shell Programming and Scripting

Assigning file attributes to variables

Hi, I'm trying to assign the permissions, owner and group of a file to seperate variables, but using ls -l filename | awk '{print $1 "\t" $3 "\t" $4}' gives the owner as tom.ja instead of tom.james Is there any way to expand it so i get the full name, or is there an easier way to get them... (5 Replies)
Discussion started by: olimiles
5 Replies

7. Shell Programming and Scripting

file attributes

How to retrieve file attributes in a sh/bash script (modification time, access time, size, etc.)? (1 Reply)
Discussion started by: Hitori
1 Replies

8. Shell Programming and Scripting

file attributes

how do we set file attributes at shell prompt (2 Replies)
Discussion started by: hytechpro
2 Replies

9. Shell Programming and Scripting

rcp and file attributes

Good day Does anyone have an idea on how I can rcp a file together with its attributes. owner,group, permissions ? Regards J (2 Replies)
Discussion started by: jhansrod
2 Replies

10. UNIX for Advanced & Expert Users

Need to view all the attributes for a file/node

I need to find out when a file has been created. 'ls -l' just lists the last date the file was modified, not the creation date. I have also noticed when viewing the attributes through NT, the last modified date is the same as the file creation date. I thought maybe this was a fault due to Samba. ... (2 Replies)
Discussion started by: dpalmer
2 Replies
Login or Register to Ask a Question