Y
Y
yourisus2016-11-06 13:11:25
linux
yourisus, 2016-11-06 13:11:25

Should the file path end with a slash or not?

There was a question about the slash in linux:
what is the difference between two such paths

/home/myprofile/somedir/

/home/myprofile/somedir

I can’t understand if a slash is needed at the end and whether it matters, it’s just that the extension is always indicated in win, .ext if it’s a file, or nothing if it’s a folder.
Can you explain?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2016-11-06
@sim3x

The path to the file cannot end with a slash
The path to the directory can

D
Dmitry Aleksandrov, 2016-11-06
@jamakasi666

A slash at the end means a directory, no slash means a file.

F
Fixid, 2016-11-06
@Fixid

The first one points to a folder
The second one to a file without an extension

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question