4 ms·
> echo "/dev/sda1 /mnt/dev ext4 defaults 0 0" | sudo tee -a /etc/fstab > If this is run again, you’ll end up having duplicate entries in your /etc/fstab You c
by soheil 5y ago
> echo "/dev/sda1 /mnt/dev ext4 defaults 0 0" | sudo tee -a /etc/fstab
> If this is run again, you’ll end up having duplicate entries in your /etc/fstab
You could also just add a space in front of a command you don't to accidentally run later. This will not store it in .history
- mdaniel 5y agoPerhaps you conflated /etc/fstab with $HOME/.bash_history? Because for sure that "sudo tee -a" will cheerfully append its stdin to the named file each time it is run, at least until you run out of disk space
- ttyprintk 5y agoSeems to me findmnt has the proper helpers for checking. But, I would recommend a systemd mount unit.