Difference between ls -l /boot and ls -l /boot/

There was a command I found explaining the ls -l command, and it gave an example as ls -l /boot/. I find that ls -l /boot and ls -l /boot/ have the same results. Does /boot and /boot/ have any differences? What does the / after boot (/boot /) mean in contrast to /boot without a / after boot?

1 Answer

The slash after boot shows that it is a directory, not a file.

You can see the difference if you create boot file in your home directory. Run

touch boot
ls -l boot/
ls -l boot

and you'll see what I mean.

If boot is a directory, it doesn't make any difference to run either way.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like