format-udf for Mac
Bash script to format a block device (hard drive or Flash drive) in UDF. The output is a drive that can be used for reading/writing across multiple operating system families: Windows, macOS, and Linux.
format-udf — overview
Bash script to format a block device (hard drive or Flash drive) in UDF. The output is a drive that can be used for reading/writing across multiple operating system families: Windows, macOS, and Linux. This script should be capable of running in macOS or in Linux.
Features Formats a block device (hard drive or Flash drive) in Universal Disk Format (UDF) UDF revision 2.01 used for maximal compatibility (see note on Linux support below) Resulting file system can be read/written across multiple operating system families (Windows, macOS, and Linux) Runs on any OS having a Bash environment Optionally wipes device before formatting Ability to override detected device block size Option to force non-interactive mode (useful for scripting) Writes a fake MBR for added compatibility on Windows (optionally disabled)
For the advanced user, format-udf is also capable of formatting a single existing partition, without modifying the partition table. Beware that using this method will render the newly formatted UDF partition unusable on macOS (but still usable on Linux and Windows). (See #24 for caveats.) Because of this limitation, the recommendation is to format the entire device.
Why? format-udf was created to address some OS-specific quirks that prevent a naively-formatted UDF device from working across various operating systems. Here are some of the complicating factors, which format-udf aims to abstract away:
Different operating systems support different versions of the UDF specification. Some OS versions only offer read-only support. Windows seems to only mount UDF devices if the file system block size matches the device's logical block size Different operating systems (like Windows XP) only attempt mounting UDF file systems with a hard-coded block size Windows does not support hard disks without a partition table. (This is strange because Windows does not apply the same limitation to flash drives.) macOS seems to only mount UDF file systems that utilize the full disk (not just a partition)
At first glance, these constraints appear to be in partial conflict. The solution, as suggested by Pieter, is to place a fake partition table (via MBR) in the first block of the drive, which lists a single entire-disk partition. This works because UDF (perhaps intentionally) doesn't utilize the first block. Unfortunately, there has been no easy way to do this, while juggling all of the other variables (such as device logical block size). format-udf writes such a fake MBR for added compatibility on Windows. If this is not what you desire, you can disable the MBR with -p none.
The goal of this project is to provide access to a cross-platform file system with modern features, in such a way that is: Easy to use for the average user Maximally compatible across operating systems As compliant as is reasonable with the UDF specification Maximally flexible to help users with uncommon needs
Details
用于将块设备格式化为UDF的Bash脚本
How to install format-udf
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2020-02-23; current version 1.8.0, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| 1.8.0 | 2020-02-23 | Stable | — | — | — | — |
| 1.7.1 | 2020-02-09 | Stable | — | — | — | — |
| 1.7.0 | 2020-02-09 | Stable | — | — | — | — |
| 1.6.1 | 2018-01-18 | Stable | — | — | — | — |
| 1.6.0 | 2017-07-26 | Stable | — | — | — | — |
| 1.5.1 | 2017-07-09 | Stable | — | — | — | — |
| 1.5.0 | 2017-06-19 | Stable | — | — | — | — |
| 1.4.4 | 2016-12-19 | Stable | — | — | — | — |
| 1.4.3 | 2016-10-30 | Stable | — | — | — | — |
| 1.4.2 | 2016-09-30 | Stable | — | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- all
⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| format-udf | 1.8.0 | GPL-2.0-or-later | CLI | 0 |
| dropbox-uploader | 1.0 | GPL-3.0-or-later | CLI | 1 |
| tengo | v3.0.0 | MIT | CLI | 0 |
| dhall-bash | 1.42.2 | BSD-3-Clause | CLI | 1 |
Similar apps: Command-line Tools
dropbox-uploader
Bash script for interacting with Dropboxtengo
Fast script language for Godhall-bash
You will probably want to read the language-agnostic README here:fabric-completion
Bash completion for Fabricrake-completion
completion-ruby: bash completion for Ruby-related commandssonar-completion
Bash autocompletion for sonarqube.Categories: Command-line Tools