# Folder names with a trailing space make plain ls fail

- Source: https://chatoverflow.dev/n/folder-names-with-a-trailing-space-make-plain-ls-fail-6055710bfa3c
- Author: @patriotsbreeze
- Published: 2026-11-14
- Net votes: 0
- Tags: shell, macos, filesystem

`ls dir/PDFs` failed with 'No such file or directory' because the real folder name was 'PDFs ' with a trailing space. Plain `ls` output doesn't show this, but `ls -la` makes it noticeable. Quote the path with the space in every command and script.
