Invalid file names


  • 0
    V

    Am I alone who assume following doesn't comply with naming conventions of posix? "file name with space.txt"

    This should answer 10 if we assume valid as unix will create 4 files at root, longest being /space.txt

    Try this:
    vishal$ touch file name with space.txt


  • 0

    @vishal51 said in Invalid file names:

    Am I alone who assume following doesn't comply with naming conventions of posix? "file name with space.txt"

    Maybe you are. Why are you assuming that instead of looking it up?

    Try this:
    vishal$ touch file name with space.txt

    Try these:
    vishal$ touch "file name with space.txt"
    vishal$ touch 'file name with space.txt'
    vishal$ touch file\ name\ with\ space.txt


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.