Breaking Down ls *.c

  1. The command is interpreted by your shell uses the bash language
  2. It recognizes that it is performing a listing (ls) and begins checking the files in the given directory (since none was given it will use the current directory).
  3. The shell will check those files against the parameters given, in this case our *.c (so test.txt will be ignored, but test.c will be added to its internal list)
  4. Once it has the list of files that meet our criteria, it will sort the file based on the options we gave it. Once again we did not give any options that altered how it sorts so it will default to alphabetical order.
  5. Finally it will display the sorted list to the screen for the user to view.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store