Format /etc/fstab files.

Overview

fstabfmt

Build Go Report Card License

Format /etc/fstab files.

Features and limitations

  • Can format /etc/fstab files.
  • Will use 2 spaces between all fields, if they are of equal length.
  • The shorter fields are padded with spaces.
  • Other padding lengths than 2 can be supplied with the -s flag.

Example use

  • Run fstabfmt /etc/fstab to see the formatted output. No changes are made to the file.
  • Run fstabfmt -s 8 /etc/fstab to see the formatted output with 8 spaces between fields. No changes are made to the file.
  • Run fstabfmt -i /etc/fstab to make changes to /etc/fstab. Always keep a backup, just in case.

Example output

Before:

# Static information about the filesystems.
# See fstab(5) for details.
#
#      
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7	/         	xfs       	rw,relatime,inode64,logbufs=8,logbsize=32k,noquota	0 1

# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 2

After:

# Static information about the filesystems.
# See fstab(5) for details.
#
#      
# /dev/nvme0n1p2 LABEL=root
UUID=2bb3c21b-dc8f-401e-991b-66afd7301cb7  /      xfs   rw,relatime,inode64,logbufs=8,logbsize=32k,noquota                                                         0  1
# /dev/nvme0n1p1 LABEL=boot
UUID=1815-DD5D                             /boot  vfat  rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro  0  2

General info

  • Version: 1.1.0
  • License: BSD-3
Owner
Alexander F. Rødseth
Software Engineer, Arch Linux TU, Go/C/Python/C++ developer and open source enthusiast.
Alexander F. Rødseth
go tool for working with /etc/hosts files

hostsfile This library, and the associated command line binary, will help you manipulate your /etc/hosts file. Both the library and the binary will le

Kevin Burke 120 Jun 15, 2022
This is a tool to extract TODOs, NOTEs etc or search user provided terms from given files and/or directories.

ado This is a tool to extract TODOs, NOTEs etc or user provided terms from given files and/or directories. DEPRECIATED: My project seek has cleaner co

Meelis Utt 0 Jan 30, 2022
Split text files into gzip files with x lines

hakgzsplit split lines of text into multiple gzip files

Luke Stephens (hakluke) 6 Jun 21, 2022
Easily create Go files from stub files

go-stubs Easily create .go files from stub files in your projects. Usage go get github.com/nwby/go-stubs Create a stub file: package stubs type {{.Mo

Sam Newby 4 Jan 27, 2022
app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files

app-services-go-linter app-services-go-linter plugin analyze source tree of Go files and validates the availability of i18n strings in *.toml files. A

Red Hat Developer 2 Nov 29, 2021
Go library for the TOML file format

Go-toml provides the following features for using data parsed from TOML documents

Thomas Pelletier 1.3k Jun 21, 2022
A command line tool for mainly exporting logbook records from Google Spreadsheet to PDF file in EASA format

Logbook CLI This is a command line tool for mainly exporting logbook records from Google Spreadsheet to PDF file in EASA format. It also supports rend

Vladimir Simakhin 0 Feb 6, 2022
osu! database file format flexible reader

Example usage package main import ( "fmt" "github.com/l3lackShark/reader" types "github.com/l3lackShark/reader/types" ) type agent struct { Osu

null 1 Nov 24, 2021
Compute message digest for large files in Go

checksum test coverage Compute message digest, like MD5 and SHA256, in golang for potentially large files. Usage package main import ( "fmt" "githu

Jerry Zhao 62 Jun 27, 2022
copy files for humans

Go-Decent-Copy go-decent-copy provides a copy file for humans Usage package main import "github.com/hugocarreira/go-decent-copy" func main() { e

Hugo Carreira 16 Mar 5, 2022
Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)

go-exiftool go-exiftool is a golang library that wraps ExifTool. ExifTool's purpose is to extract as much metadata as possible (EXIF, IPTC, XMP, GPS,

null 114 Jun 22, 2022
Load GTFS files in golang

go-gtfs Load GTFS files in Go. The project is in maintenance mode. It is kept compatible with changes in the Go ecosystem but no new features will be

Louis 32 Mar 5, 2022
An implementation of the FileSystem interface for tar files.

TarFS A wrapper around tar.Reader. Implements the FileSystem interface for tar files. Adds an Open method, that enables reading of file according to i

Eyal Posener 50 May 17, 2022
QueryCSV enables you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to a CSV file

QueryCSV enable you to load CSV files and manipulate them using SQL queries then after you finish you can export the new values to CSV file

Mohamed Shapan 100 Dec 22, 2021
A Go io/fs filesystem implementation for reading files in a Github gists.

GistFS GistFS is an io/fs implementation that enables to read files stored in a given Gist. Requirements This module depends on io/fs which is only av

Jean Hadrien Chabran 124 May 1, 2022
Create ePub files from URLs

url2epub Create ePub files from URLs Overview The root directory provides a Go library that creates ePub files out of URLs, with limitations.

Yuxuan 'fishy' Wang 29 May 8, 2022
🏵 Gee is tool of stdin to each files and stdout

Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go. which provides output to stdout and files.

HAHWUL 64 Jun 13, 2022
Golang PDF library for creating and processing PDF files (pure go)

UniPDF - PDF for Go UniDoc UniPDF is a PDF library for Go (golang) with capabilities for creating and reading, processing PDF files. The library is wr

UniDoc 1.6k Jun 27, 2022