Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [file-types]

The tag has no usage guidance.

7
votes
2answers
2k views

cat shows nothing

My team is working on a CI environment. A ko file, named x.ko, is always generated from the CI environment at a regular time everyday and its type is ELF 64-bit LSB relocatable. Today, I found that ...
0
votes
1answer
56 views

How to create a 7zip archive of files from a directory, excluding existing archives?

Want to 7zip all files in root/current folder except for all zip-files AND all 7z/7zip files. I can only get one of these to work at a time in one if ! statement: for file in ./test2/* do if ! { ...
9
votes
3answers
2k views

How to find files by file type?

I know I can find files using find: find . -type f -name 'sunrise'. Example result: ./sunrise ./events/sunrise ./astronomy/sunrise ./schedule/sunrise I also know that I can determine the file type ...
0
votes
2answers
50 views

How to detect the type of a file in tar.gz

I want to detect the type of a file, which is compressed into a tar.gz, but I don't want to extract it. In a word, is it possible to execute a command (such as file) onto a file in a tar.gz without ...
2
votes
1answer
25 views

Changing program used to open file based on file extension

For a college class, I have to download and open .rkt files. In order to open them with the correct program I have to right-click > open with, and if I set a default program, it becomes the default ...
2
votes
2answers
2k views

What are anon_inodes?

While looking through /proc/[PID]/fd/ folder of various processes, I found curious entry for dbus lrwx------ 1 root root 64 Aug 20 05:46 4 -> anon_inode:[eventpoll] Hence the question, what are ...
2
votes
1answer
42 views

File doesn't seem to be regular but is listed as such

From what I understand, on Linux/UNIX files from which you get system info aren't regular files but rather device files and yet I have encountered a file that doesn't seem to be regular (due to its ...
0
votes
1answer
141 views

How to download a document from a webpage with wget

I have a web page which contains a link to a document. I'm able to download the document by using the following command: wget -r -A.doc www.website.com/1.doc However, I would like to provide the ...
1
vote
1answer
5k views

Explain please what is a magic file in unix [closed]

We can create magic files with file -C -m filename. Also there is the /usr/share/file/magic folder with a list of magic files on my OS X machine. But what is this? Would somebody explain, why ...
1
vote
1answer
126 views

How are binary files “binary”?

I understand that a binary file is not simple machine code with zeroes and ones. At a meeting yesterday, my colleague stated that we would need a hexdump editor to read binary configuration files for ...
0
votes
1answer
331 views

Comments in ~/.config/mimeapps.list

I want to add comments in my ~/.config/mimeapps.list file. How do I do this? Chapter and verse preferred as errors seem to be silently ignored.
1
vote
0answers
54 views

Is there a content search program/port (*not* index based) that's efficient for files needing text extraction filters

If using FreeBSD as a file server for windows clients, it's useful to be able to run file searches server-side rather than client-side. A typical example might be: find all files meeting some ...
2
votes
1answer
27 views

How to preserve the original extension after multiple files manipulation

This follow is a useful command to add a border to multiple images (require ImageMagick package): convert -border 5x5 -bordercolor "#008000" *.png imgs The result is that the new files will be named ...
1
vote
0answers
159 views

List all filename extension associations for a given program

Is there a way of getting all xdg-open's file name extensions that are associated with a given application, eg: .html -> firefox.desktop .htm -> firefox.desktop
2
votes
2answers
161 views

How to rename misnamed files with their appropriate extensions?

I have a folder with the bulk of files in it of different types, i.e .pdf,.jpg,.png,.tiff etc., but all are named with the extension .JPG. How can I rename all of them with their original extensions? ...
3
votes
1answer
109 views

How to associate file types on Linux host with Windows applications through VirtualBox?

How can I associate file types in desktop Linux with Windows 7 applications running through VirtualBox so they work seamlessly, starting VirtualBox if required? I'm using KDE. Current method (...
1
vote
1answer
119 views

Unix decides about the type of a file looking for magic files at fixed offsets. How can it do so reliably?

From https://linux.die.net/man/1/file: The magic tests are used to check for files with data in particular fixed formats. The canonical example of this is a binary executable (compiled program) a....
0
votes
1answer
218 views

wget convert tgz file to HTML

I'm trying to download a .tgz file under debian so I decided to use wget for this. This is my command line : ~$ wget http://www.netmet-solutions.org/download/netMETdistrib-4.5_5.8_20160322.tgz I ...
4
votes
1answer
2k views

Setting default application for filetypes via CLI?

I have 150 Debian Jessie machines that open ODS files in Gnumeric when double-clicked despite LibreOffice Calc being installed. I know it is possible to change this by right-clicking the ODS file and ...
1
vote
0answers
291 views

How can I open a MIME-formatted file?

On several distributions of Linux, there is a utility called xdg-open, which opens a file in the default application for that particular file type. E.g., for HTML files, it might open firefox. A MIME-...
0
votes
1answer
2k views

linux64 extension

I'm trying to install a program (Teensyduino) on Xubuntu 16.04, but the executable installation file has a .linux64 extension. I've tried running the following commands to open it sudo ./...
-1
votes
1answer
82 views

File Stat Program [closed]

I have a simple program which prints whether a pathname argument is either a directory, regular file with execute privileges, a regular file, a symbolic link, or other. I have the following if ...
6
votes
1answer
1k views

Unknown Filetype in ls

In general, what are the reasons why a filetype might show as unknown (?) in ls output? See the first bit for the file /sbin/start-stop-daemon, which should indicate - for "regular file", instead is ...
2
votes
1answer
2k views

How to convert chromium os bin file from Source Forge to iso?

I want to convert the bin file from source forge I've try to call: bchunk chromiumos_image.bin chromiumos_image.cue chromiumos_image.iso but got error: Could not open BIN chromiumos_image.bin: ...
4
votes
1answer
714 views

how can I read a number with file (magic)?

I would like to write the format of a drawing with "file drawing" Files start like: CAD A1 mm (Blank after A1) or: CAD A00 m (Blank after "m") I tried somethings like in the file magic: 0 ...
5
votes
2answers
2k views

Sort files into folders, depending on filetype

I have about 2.8TB (yes, terabytes) of data I have recovered, this will be scanned for duplicates, the machine these files reside on is quite old and only has 2GB of memory (works fine for LVM, ...
2
votes
2answers
756 views

magic example using search and/or regex

I am trying to have the file command detect some Windows text files that were never meant to be classified by file... The best choice seems to use regex to match the line content, but I cannot find a ...
-1
votes
1answer
79 views

Problem using SAP site

My father's company site uses SAP. He's trying to move to Linux (tired of Windows' bugs, problems and viruses) but he can't natively use the site's functionalities. When he tries to open those a popup ...
2
votes
2answers
453 views

Bash script to count file types in a path (including subfolders)

I would like to get a quick overview over the different file types in a directory (including all its subdirectories) using the file tool, e.g. telling me what file type is the most common one there. ...
8
votes
4answers
26k views

How to use wc and piping to find how many files and directories are in a certain directory?

How can I use word counter (wc) and piping to count how many files or directories are in the /usr/bin directory?