miguel
35aa7fea5e
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
Strange Files
Instructions
Create the following files:
firstFile
which containsRandom text inside!
and nothing else"medium_File!"
which containsRandom text inside!
and nothing else"\?$*'Hard_file'*$?\"
which containsRandom text inside!
and nothing else.
Usage
$ ls | cat -e
"\?$*'Hard_file'*$?\"$
firstFile$
"medium_file!"$
$
Hints
We come across files and folders name very regularly. In most of the cases file/folder names are related to the content of the file/folder and starts with numbers or letters. Alpha-Numeric file name are pretty common and very widely used, but this is not the case when we have to deal with file/folder name that has special characters in them.
Example of most common file names are:
something.txt
alphanum21.txt
674659.txt
Examples of file names that have special characters:
#121day.txt
some/file#.txt
*File$*.txt
When You create a file with some special character, you will need to escape
those special characters in order to create that file.
A non-quoted backslash \
is the escape character. The backslash \
preceding a character tells the shell to interpret that special character literally.
Example:
If you want to create a file named foo!\.txt
You have to escape the characters like so:
$ touch foo\!\\.txt
ls
. List directory contents.touch
used to create, change and modify timestamps of a file.
You have to use Man or Google to know more about commands flags, in order to solve this exercise! Google and Man will be your friends!