cd
cd it244
cd ex
mkdir ex7
cd ex7
nano foo.txt
cat on the file
cat foo.txt
cat prints the file to the terminal.
mv foo.txt foo.xyz
nano
nano foo.xyz
nano opens the file without difficulty.
nano does not care about the extension.
cat on the renamed file
cat foo.xyz
cat does not care about the extension.
pwd
You should be in the ex7 directory inside your ex directory
of your it244 directory.
cd ..
.. means the directory one level up.
pwd
You have moved up one level.
cd /
pwd
You are at the top of the filesystem.
ls
Notice that the home and courses directories are subdirectories
of the root directory.
cd
pwd
Your home directory is inside the directory named home, which is, itself,
under the root directory, /.
cd it244/ex/ex7
pwd
stat to get some information about the Linux host
stat -f /home
stat with grep to learn the largest filename possible
stat -f /home | grep Namelen
touch 'hello there'
If you did not put "hello there" in quotes, you would create 2 new files,
hello and there.
ls
It looks like you have created two new files.
ls -l
Now you can see that there is only one new file.
rm 'hello there'
ls
touch bar.txt
ls
touch bar.txt
ls
You only have one bar.txt file since you can only have one file
with a given name in any one directory.
touch Bar.txt
ls
You have two files since, as far as Unix is concerned, bar.txt
and Bar.txt are totally different file names.
touch fOO.txt FOO.txt FOO.TXT
ls
You should see the files you just created since they have
different capitalizations.
rm *.txt
cd ~/it244/ex/ex7
pwd
If not, see me.
nano ex7.sh
bash ex7.sh > /dev/null
Running ex7.sh this way
will only print error messages.
~tsoro/it244_test/ex07.sh
When the script asks if you are ready for more, hit Return or Enter.