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...
Necessary adjustments to data and label position, as well as formats, should be made while the report is in Design View
Indicate whether the statement is true or false
A doubly circularly linked list makes it easy to
A) move forward through a list, and then quickly jump to the beginning of the list when you get to the end B) to jump from the last node to the first, from the first to the last, and to move forward and backward through the list C) to skip two nodes at a time in either direction, and wrap around the list when you come to the end D) do nothing: there is no such as a doubly circularly linked list