B.1.1 Working with Strangely-Named Files

Occasionally, you may find that you have accidentally created a file

that contains a character not normally found in a filename. Examples

of this could include a space, a leading hyphen, or maybe a

quotation mark. You may find that accessing, removing, or renaming

these files can be difficult.

Here are some tips to help you:

◼ Try enclosing the filename in single quotation marks, like this:

less ’File With Spaces.txt’

◼ Insert a ./ before the filename:

less ’./-a strange file.txt’

◼ Use wildcards:

less File?With?Spaces.txt

◼ Use a backslash before each unusual character:

less File\ With\ Spaces.txt

Debian GNU/Linux : Guide to Installation and Usage · 第 179 / 193 题