An Introduction to the Command-Line (on Unix-like systems)

by Oliver; 2014

6. The Great Trailing Slash Debate

Sometimes you'll see directories written with a trailing slash, as in:
dir1/
This helpfully reminds you that the entity is a directory rather than a file, but on the command line using the more compact dir1 is sufficient. There are a handful of unix commands [1] which behave slightly differently if you leave the trailing slash on, but this sort of pedantry isn't worth worrying about yet.



[1] See, for example, the discussion of rsync

<PREV   NEXT>