Introduction

This page describes how to reindent /etc/fstab.

Procedure

  1. Run the command:

    perl -pi -e 's/^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*/sprintf("%-10s %-16s %-12s %-30s %-1s %-1s\n",$1,$2,$3,$4,$5,$6)/e;' /etc/fstab 

See also

CategoryProcedure

ReformattingEtcFstab (last edited 2010-12-17 16:50:53 by AlexisHuxley)