-
Notifications
You must be signed in to change notification settings - Fork 0
Handling file paths containing certain characters
Ralf Kilian edited this page Oct 1, 2020
·
19 revisions
Table of contents
Paths which contain spaces must either be enclosed with (single or double) quotes or given with escaped whitespaces.
Escaping also applies to special characters such as quotes or backslashes inside the file name. Due to the fact, that backslashes are escape characters, it is most unlikely that a file path contains one.
Below you can find a few examples of escaped characters.
Each of those characters must be escaped using a backslash (\
) which also applies to consecutive ones.
File path | Escaped |
---|---|
/home/johndoe/server mails.log |
/home/johndoe/server\ mails.log |
/home/johndoe/server user logins.log |
/home/johndoe/server\ user\ logins.log |
/home/johndoe/server user logins.log |
/home/johndoe/server\ \ \ user\ logins.log |
File path | Escaped |
---|---|
/home/johndoe/output of 'tail'.log |
/home/johndoe/output\ of\ \'tail\'.log |
/home/johndoe/output of "tail".log |
/home/johndoe/output\ of\ \"tail\".log |
Most unlikely, but just in case:
File path | Escaped |
---|---|
/home/johndoe/foo\bar.log |
/home/johndoe/foo\\bar.log |
Wiki
Quick start
Installation (optional)
- Quick installation guide
- Manually downloaded archive
- Verifying archive integrity
-
Installation script
(to install, update and uninstall)
- RPM package
Compatibility
Configuration
Salomon-BSD
Usage
- Processing input files
- Colorizing and highlighting certain lines
- Handling file paths containing certain characters
Development