Giter Club home page Giter Club logo

uti's Introduction

uti

A command-line utility that prints the Uniform Type Identifier for the files provided as an argument.

Requirements

  • macOS 10.4+

Usage

$ uti Hello.swift
public.swift-source

Results for multiple path arguments are printed on separate lines in the order they're provided:

$ uti index.html screen.css app.js
public.html
public.css
com.netscape.javascript-source

If any of the provided file path arguments are invalid, the command exits with status code 1 and prints a message to standard error.

$ uti invalid
error: invalid is not a file or directory

You can combine uti with other Unix commands. For example, to list the UTI for each file in a directory, you might invoke the find command like so:

$ ls .
Xcode_11.xip
Xcode.app

$ find . -exec uti {} +
com.apple.xip-archive
com.apple.application-bundle

Installation

Homebrew

Run the following command to install using homebrew:

$ brew install nshipster/formulae/uti

Manually

Run the following commands to build and install manually:

$ git clone https://github.com/NSHipster/uti.git
$ cd uti
$ make install

Additional Details

uti delegates to the mdls system command, requesting the kMDItemContentType metadata attribute and processing the output.

License

MIT

Contact

Mattt (@mattt)

uti's People

Contributors

mattt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sambacha

uti's Issues

Version 1.0.1 not published on Homebrew

Hello,

I've just tried to install uti through Homebrew and got the version 1.0.0, while the latest version is 1.0.1.
I cloned the repo at the end, but having the updated version on Homebrew could help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.