How can you create a file named –i? Which techniques do not work, and why do they not work? How can you remove the file named –i?
What will be an ideal response?
Most utilities assume –i is an option, not the name of a file, and therefore
do not work properly when they are called with an argument of a file named
–i:
$ touch -i
touch: invalid option -- i
Try 'touch --help' for more information.
The following commands create a file named –i:
$ cat > -i
CONTROL-D
The preceding example uses the shell to create the file. It works because the
shell expects a filename following a redirect output symbol and does not
treat –i as an option.
Many utilities assume everything on the command line to the right of a ––
option is a filename. Using one of these utilities, you can work with a file
whose name begins with a hyphen by marking the end of the options on the
command line with the –– option followed by the filename:
$ touch -- -i
You can remove the file by using –– to signal the end of the options:
$ rm -- -i
One of the easiest ways to create and remove this file is to locate it in the
working directory as ./–i. The filename does not begin with a hyphen so
there is no confusion.
$ touch ./-i
$ rm ./-i
You might also like to view...
The ____________________ primary colors of light ca combine to produce all the other colors in the spectrum.
Fill in the blank(s) with the appropriate word(s).
Operations, such as comparing two numbers to determine if they are equal, are called ____________________ operations.
Fill in the blank(s) with the appropriate word(s).
Use the World Wide Web as an example to illustrate the concept of resource sharing, client and server. What are the advantages and disadvantages of HTML, URLs and HTTP as core technologies for information browsing? Are any of these technologies suitable as a basis for client- server computing in general?
What will be an ideal response?
A ____ edge is an angled or indented edge, like you would see on a picture frame or on a mirror.
A. transformed B. beveled C. distorted D. converted