General :: Getting Content-type/Mime Type Of The File Using Shellscript

May 24, 2011

I am copying the file form one directory to another directory using shellscript.

Here i want to get the Mimetype/Content-type of the file.

How to i can get the MimeType.

View 9 Replies


ADVERTISEMENT

Ubuntu :: Script To Rename File Based On Mime Type?

Jan 9, 2011

I have a folder containing the output from Windows XP "File and Settings Transfer Wizard" - the folder refuses to be imported into any flavour of Windows and the original windows system is no more - so I found a little program called fastconv [URL] which extracted all the files but fails to rename them - been working on this solidly for 3 days now, there are 47,000 files in 20gb, so naturally the customer is very concerned.

I noticed that Ubuntu cleverly recognises the type of file, assuming its looking at the contents of the file rather than the extension.

Is there any way I can automatically rename the files based on the mime type?

View 2 Replies View Related

Ubuntu :: Edit Mime Types To Remove A File Type Association?

Oct 30, 2010

I installed a trial copy of Anquet Map V06 under Wine then decided to remove it. Afterwards I could find many remnants associated with the Anquet program which I've deleted. Except what remains is an association between my .gpx files with Anquet and that includes and any new gpx file I download. My interpretation is that during the install process an association has been created with the gpx file type and the Anquet map program. This is what I want to stop. If I download a .gpx file and look at it's properties I see- Type: GPX File -Anquet Mapsv06 (application/x-wine-extension-gpx) I found this file and it's contents-

/.local/share/mime/application/x-wine-extension-gpx.xml
<mime-type type="application/x-wine-extension-gpx">
−
<!--

[code]....

Running "sudo update-mime-database /usr/share/mime" and rebooting didn't remove the association. How can I stop the Anquet name making as association with my gpx files?

View 9 Replies View Related

Ubuntu :: Use Mime Type Instead Of Thumbnails For .pdf?

Nov 12, 2010

I installed faenza icon theme and would like to have for my pdf docs only mime type (included in mime types/ icon theme), not a thumbnail. Is there some easy way to change this system wide?
I tried this and similar suggestions found on net, but no go:
http://ubuntuforums.org/showthread.php?t=770142

Using Ubuntu 10.04 64bit (Gnome)

View 3 Replies View Related

Ubuntu :: Changing File System Type To Another Filesystem Type - Does It Effect On Data?

Feb 4, 2011

In my system around 73gb(pc-desktop) i have,1 primary partition(windows)-25gb, 1-extended partition(remaining gb) 3 logical partitions were there in (under) extended partition in one of the logical partition is d:drive. in my hard disk d: drive is -/dev/sda5

previosly i was fat -file system , (d:drive-/dev/sda5), i remember i changed the d: drive(d:drive-/dev/sda5) file system to ext4file system ,with following command using terminal

After doing(changing the file system)this one ,i couldnt see the d:drive data

By doing that

1q) Did i reformatted the partition? i think the new filesystem(ext4) has no knowledge of the data that was on it when it had a FAT filesystem.

2q) How to do undo operation,i tried to change the filesystem type to fat/ntfs in terminal using command --sudo mkfs -t FAT /dev/sda5.

Result:its showing text message-'mkfs.FAT: No such file or directory'(not in single quote)

I had very imp data in d:drive

View 1 Replies View Related

Programming :: Get Program Based On Mime-type In C

Feb 10, 2010

I need to launch programs in my program and the program can be a script, a Linux executable or even a Windows executable. The first thing i tried is to use xdg-open from my program, but i can't pass arguments to it, otherwise it would have worked perfectly. Is there maybe a way to determine which program is set as default according to the mime-type of the program i want to launch? I also tried kfmclient and gnome-open, they don't allow arguments either.

View 2 Replies View Related

Slackware :: Mime Type Associations For Office Files

Oct 22, 2009

I installed MS office 2003 via wine on Slackware 13. I need to know how to associate files with the right Office (msword, msexcel, msppt) program. I made launcher scripts that can launches office files from the CL, but the user on this computer will want to be able to just double click a file in dolphin and have the right office program come up.For some reason all office files show up as x-ole-storage instead of application/msword or something similar. So, even if I tell Excel to associate with that file, it will do it for Word and PowerPoint files as well.

.ppt, .doc, and .xls extensions were configured via the KDE file associations panel, but this did not help. I played around with the raw files under ~/.local/share, but I did not find the solution.The version of WINE is 1.1.24 (built from SBo SlackBuild).

View 2 Replies View Related

Ubuntu :: Unable To Locate Encoding Profile For Mime-type?

Feb 7, 2010

I am trying to transfer extracted music files from a CD into Rhythm Box music library, and I get the response, "Unable to locate encoding profile for mime-type"

View 2 Replies View Related

Slackware :: Mime Type Error Opening Dolphin And Other Kde 4.4 Applications

Feb 11, 2010

I did a clean installation of KDE 4.4 Alien bob`s packages and when I open the dolphin, for example, appears this error:

The icons and directories are all on blank...

View 1 Replies View Related

Debian Multimedia :: MATE Desktop - Setup Default Apps (MIME-Type)

Aug 28, 2015

I can't setup or change MIME-Types in Mate/Caja (filemanager)

I use MATE Desktop on Debian 8.1 - File Manager is Caja (1.8.2) - I put in a USB Stick whit Pics. In the Popup Window they came up, normally i can setup a Default behavior for Pics, Music ... But, in my Window the Options are not available. (Grey) The same in "Settings" from Caja (Datenträger) Data Medium.

What can i do to set MIME Types in Mate?

View 0 Replies View Related

Software :: Error In File "/usr/share/applications/kde4/kfontview.desktop": "fonts/package" Is An Invalid MIME Type

Oct 5, 2010

attempting to install VLC I get the following errors;

Error in file "/usr/share/applications/kde4/kfontview.desktop": "fonts/package" is an invalid MIME type ("fonts" is an unregistered media type)
Warning in file "/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of MIME type "x-directory/gnome-default-handler" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)
Warning in file "/usr/share/applications/gnome-nautilus-folder-handler.desktop": usage of MIME type "x-directory/normal" is discouraged ("x-directory" is an old media type that should be replaced with a modern equivalent)

Thoughts or suggestions on how to fix this. I running Fedora 13 and I used 'yum install vlc' to install the app.

View 7 Replies View Related

Fedora :: Enter Content-Type In Attachments In Thunderbird?

Feb 26, 2010

FC12/KDE How to do you enter Content-Type in Attachments in thunderbird? I have people sending me pictures I can't open in Thunderbird , it wants me to "Save" them, that has a Content-Type of Octet-Stream and I want enter Gwenview to view this Content-Type. There is no "Options" in the "Tools" window.

View 8 Replies View Related

Ubuntu :: Error: Can't Perform Indexing Operations For <unknown Type> Type

Feb 26, 2010

I just loaded octave. I ran through a few examples of how to implement a script file. Everything works until I get to "plot". When I run the "plot" command I get the following.

octave:2> test1.m
error: can't perform indexing operations for <unknown type> type
sh: gnuplot: not found
Just to double check my work, I ran the following code:
y=[1 2 3];
plot(y);

View 3 Replies View Related

Security :: Server Hacked When Try To Log In Type Root But Won't Let Type A Password?

Jun 22, 2010

I have a server hacked when i try to log in i type root but won't let me type a passwdthere are no services up, can't see page mail nothing

View 11 Replies View Related

Programming :: Error - Array Type Has Incomplete Element Type

Jan 26, 2010

I'm trying to compile a program and it gives me the following:

I checked cmath-util.h:46 and cmath-util.h:48:

I'm not a C person, and the author is unavailable so far.

View 5 Replies View Related

General :: The File Type Is .tar.bz2 , But Don't Know How To Install It

Sep 26, 2010

I have stood it for a long time. Have anyone changed it successfully ? Please tell me and all the friends viewed this thread.I often download login window theme package from http://art.gnome.org/themes/gdm_greeter , the file type is .tar.bz2 , but I don't know how to install it.

View 3 Replies View Related

General :: Enabling Vim File Type Plugin?

Jun 15, 2010

In my .vimrc file I have this line..filetype plugin indent on and then in ~/.vim/ftplugin/py.vimrc (I've also tried saving it as a .vim file) I've copied and pasted a vimrc file for python standards and have enabled all of the suggested settings in it (uncommented them). When I create and open a test.py file and do something like a tab, it goes 8 spaces instead of 4.

View 3 Replies View Related

General :: File Type Check In Perl?

Oct 12, 2010

I am witing a file upload program in perl where i need to upload a wav or a gsm file and save it as a gsm file.How can i make sure that the uploaded file is a wav or a gsm sound file and not an executable malicious script or something.

View 2 Replies View Related

General :: How To Define File Type For Wget

Jan 25, 2011

how can I define file type for wget to download . for example I do not want to download *.html or I just want to download *.jpg files . or if it does not support any of them do you know any other suggestion ?

View 1 Replies View Related

General :: Php File To Be Display When Type The Ip Address Only?

Apr 7, 2011

i have some php file and i store it inside /var/www/html/and to display it i type Quote:http://ip addrs/file.phpto display the details..and the problem is that i want the php file to be display when i type the ip address only like thisQuote:

View 3 Replies View Related

General :: Set Permission Type On A File To A Particular User In A Group?

Jan 20, 2011

i want to set permission type "write" on a file to a particular user in a group of users ( not all users in that group). chown is changing a user to root , but i want to set say permission of "write" only to a user 1 in group staff which contains 10 users 1 , user 2 ...user 10.

View 3 Replies View Related

General :: Executing The Default Application Assigned To A File Type?

Dec 10, 2010

Using gnome terminal (Ubuntu 10.10), is there a way to execute the default application associated to a file type, only by typing its name, as it is possible with Windows ?

For example, say I create a mime type associated to every file with the pattern *.abc. Lets say I associate this file type to application 'my_app'.

If I have file 'my_file.abc' in current folder, what I want is that when I enter only 'my_file.abc' at the prompt, it executes 'my_app' feeding it with 'my_file.abc' as first argument. (assuming of course 'my_app' is in the path)

View 3 Replies View Related

General :: Accidentally Type Concatenate Large File On Remote System

May 6, 2010

Every once in a while on a computer I'm ssh'd into, I will accidentally type "cat largefile.txt" and my screen will start rushing with text for the next 10 minutes. I'm always working in a screen session, so my current solution is to just log out and then log back in, and since it can go 100X faster when I'm logged out, it'll finish in the short time it takes me to type my password in again. Is there a better way? Either involving the fact I'm in a screen session? Or a way to do this within SSH? What doesn't work: detaching from the screen session (doesn't respond until file is done outputting) trying command to move to a different window in the screen session (also doesn't respond) typing ctrl+C to kill cat command (also doesn't respond, probably because the command is done and the buffers just have to catch up).

View 3 Replies View Related

General :: Identify File System Type From The Output Of Fdisk Command?

Nov 16, 2010

The output of my fdisk command is as follows :-zodiac@gml-admin:~$ sudo fdisk -l[sudo] password for zodiac: Disk /dev/sda: 160.0 GB, 160041885696 bytes255 heads, 63sectors/track, 19457 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe30ce30c

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1958 15727603+ 7 HPFS/NTFS
/dev/sda2 1959 4752 22437838 f W95 Ext'd (LBA)

[code]...

View 2 Replies View Related

General :: Commands To Find Type / MountPoint / File System Id For The Filesystems?

Jan 12, 2010

I need commands which five me the following details abt all the file systems mounted the linux box

type
mount pt
file system id

View 4 Replies View Related

General :: GRUB Legacy - Unable To Determine The File System Type?

Dec 8, 2010

I had only Arch on an HDD.sda2 was "/".Now it's with Windows XP and sda2 is not a root any more but a container partition wich has sda{5,6,7} in it. I configured the dual boot and it works. It finds Arch and boots it, but not completely. Stops after some time and says: unable to determine the file system type of /dev/sda2. FSTAB is configured, sda{5,6,7} are on their places. So I can't boot Arch. XP boots correctly. What do I do with this error?Also it says: try adding rootfstype=your_filesystem_type to kernel command line.

View 4 Replies View Related

General :: How To Make Grep To Search A Pattern In Only Specific File Type?

Mar 6, 2010

To search a string pattern in all files in a directory and subdirectories, I am using;

Code:
grep -R "myclass::my-func(" mydirectory/
Now I want grep, to search in only specific file types say *.cc. Please help me. I have read manual of grep, but could not deduce any hint.
Best Regards.

View 7 Replies View Related

General :: Change To Shell Type That From SH To TCH And Back Again And Lost Coloring Of File System

Nov 18, 2010

after i made the change to my shell type, that from SH to TCH, and back again, i lost my coloring for my file system, if you know what i mean, folders always come in blue, and devices in yellow hope you understand? now everything i do can't seem to differentiated between files colors anymore.

View 7 Replies View Related

General :: Ext4 New File System Mounting Compatibility With The Older Ext3 Type?

Sep 7, 2009

How well is the ext4 new file system mounting compatibility with the older ext3 previous Linux installations ? I refer to Ubuntu 9.04 and the new Fedora 11 which have the option to install with the ext4 file format. Will it be better if I install with the older ext3, so that I will be able to mount all other Linux from each other in a multi-boot system ?

View 6 Replies View Related

General :: Grub Mod Files Show As Music File Type For Mint 8 Gnome

Jan 1, 2010

In the /boot/grub/ all the grub mod files show as music file type for Linux Mint 8. So is it really needed to correct this, and how to change this file type from some music application to the grub module file type association?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved