Book II Chapter (Web design portfolio) 2 Commanding the Shell Discovering

Book II Chapter 2 Commanding the Shell Discovering and Using Linux Commands 159 . hh is a two-digit hour in 24-hour format (00 is midnight and 23 is 11:00 p.m.). . mm is a two-digit number for the minutes (00 through 59). . YYYY is the four-digit year (such as 2005). The other interesting date-related command is cal. If you type cal without any options, it prints a calendar for the current month. If you type cal followed by a number, cal treats the number as the year and prints the calendar for that year. To view the calendar for a specific month in a specific year, provide the month number (1 = January, 2 = February, and so on) followed by the year. Thus, to view the calendar for January 2005, type the following and you get the calendar for that month: cal 1 2005 January 2005 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Processing files You can search through a text file with grep and view a text file, a screen at a time, with more. For example, to search for my username in the /etc/passwd file, I use grep naba /etc/passwd To view the /etc/inittab file a screenful at a time, I type more /etc/inittab As each screen pauses, I press the spacebar to go to the next page. Many more Linux commands work on files mostly on text files, but some commands also work on any file. I describe a few of the file-processing tools next. Counting words and lines in a text file I am always curious about the size of files. For text files, the number of characters is basically the size of the file in bytes (because each character takes up a byte of storage space). What about words and the number of lines, though?
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.