/etc/fstab: Spaces in the source path

In order to mount a directory, image or device with a space in the file path such as:


/mnt/box/downloads/OS/Windows 7 SP1/en_windows_7_with_sp1_dvd.iso ==> /tftpboot/images/windows7

one can type in:


mount -t udf -o loop /mnt/box/downloads/OS/Windows\ 7\ SP1/en_windows_7_with_sp1_dvd.iso /tftpboot/images/windows7/

However, in order to add this entry to the fstab file, one must replace spaces with \040:


# cat /etc/fstab
/mnt/box/downloads/OS/Windows\0407\040SP1/en_windows_7_with_dvd.iso /tftpboot/images/windows7 udf ro,loop,auto 0 0

Leave a Reply

Your email address will not be published.