Re: A Good Question.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Woods wrote:

> Bonus problems:
> How to create and delete file names with spaces or control characters?

Use single quotes; within single quotes, all characters are treated
literally, except for the terminating quote. If the filename contains
any single quotes, use '\'' (quote, backslash, quote, quote), e.g.

	rm 'foo'\''bar'

will remove a file called foo'bar.

However, note that this issue is due to the shell; it doesn't apply
when passing arguments directly via e.g. execve(). OTOH, filenames
which look like options are due to the command itself.

> How about slashes  (not as a directory delimiter) in the filename?

Not possible. A filename cannot contain a slash; this is enforced by
the kernel. If you encounter a filename which contains a slash, the
filesystem is corrupted.

-- 
Glynn Clements <glynn.clements@xxxxxxxxxx>
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux