Unix Commands Part 1
man,banner,cal, calendar,clear,nohup, tty .
- man ls will explain about the ls command and how you can use it.
- man -k pattern command will search for the pattern in given command.
Banner command.
banner prints characters in a sort of ascii art poster, for example to print wait in big letters. I will type
banner wait at unix command line or in my script. This is how it will look.
# # ## # ##### # # # # # # # # # # # # # ## # ###### # # ## ## # # # # # # # # # #
Cal command
cal command will print the calander on current month by default. If you want to print calander of august of 1965. That's eightht month of 1965.
cal 8 1965 will print following results.
August 1965 S M Tu W Th F S 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
Clear command
clear command clears the screen and puts cursor at beginning of first line.
Calendar command
calendar command reads your calendar file and displays only lines with current day.
For example in your calendar file if you have this
12/20 Test new software. 1/15 Test newly developed 3270 product. 1/20 Install memory on HP 9000 machine.On dec 20th the first line will be displayed. you can use this command with your crontab file or in your login files.
Nohup command.
nohup command if added in front of any command will continue running the command or process even if you shut down your terminal or close your session to machine. For exmaple, if I want to run a job that takes lot of time and must be run from terminal and is called update_entries_tonight .
nohup update_entries_tonight will run the job even if terminal is shut down in middle of this job.
Tty command
Tty command will display your terminal. Syntax is
tty options
- Options
- -l will print the synchronous line number.
- -s will return only the codes: 0 (a terminal), 1 (not a terminal), 2 (invalid options) (good for scripts)
Comments