Sample Header Ad - 728x90

How to align fstab entries easily

9 votes
8 answers
10728 views
Editing /etc/fstab with my text editor makes all the spacing go out of alignment. I could go through the file and insert/delete spaces to line everything up, but I'm looking for a more automated solution. Ideally, there would be an online javascript page that I could put my fstab into, and have it "pretty" align everything. Then I could copy/paste the final result back into the file. Is there a similar or better solution to this available? EDIT: I use Linux on my desktop, and I'm not seeking to join the religion of vi or emacs just to edit my fstab. Emacs might be a better solution for some people, but for some other people it's not a better solution. EDIT2: Here is an example snippet of my fstab using tabs. The columns are not in alignment. proc /proc proc nodev,noexec,nosuid 0 0 /dev/disk/by-label/Linux / ext4 errors=remount-ro 0 1 /dev/disk/by-label/Home /home ext4 defaults 0 0 I want it to be automatically formatted with spaces and look more like the following. proc /proc proc nodev,noexec,nosuid 0 0 /dev/disk/by-label/Linux / ext4 errors=remount-ro 0 1 /dev/disk/by-label/Home /home ext4 defaults 0 0
Asked by Sepero (1619 rep)
Oct 14, 2013, 08:21 PM
Last activity: Apr 22, 2025, 07:59 PM