Hdi2u S05

From wiki
Jump to: navigation, search

Answers

  • You get the hidden files
  • the -l is the long listing
  • this file is empty, it has no content.
  • by default ls will list files anywhere it can find them.
  • this is the Present Working Directory, it tell us where all these files are.
  • sl is the most common typo, so it became a trick program, try it and see

Exercise: Focus only on directories

  • Try postfixing the asterisk with a / and also give the -d option
ls -d */
  • Once we find a file, and know its size and date, the poorly named file command will give use more details. Try
file *
  • It's a lot of information, can it be explained?
  • Another useful companion command to ls is wc -l, word counti iwht the line option. Try:
ls -l tes*[123].embl
wc -l tes*[123].embl
  • What extra information are you getting?