Commands: $ logname  to check present working user. User2 $ clear



Download 122.5 Kb.
Page1/17
Date25.10.2023
Size122.5 Kb.
#62396
  1   2   3   4   5   6   7   8   9   ...   17
Unix Commands

$  Normal user prompt
#  System admin prompt


Commands:
$ logname  to check present working user.
User2
$ clearto clear screen
We can also use cntrl+l to clear screen
$exit  to quit from user session.
=====================================
1. $ man [command name]  displays use and options of the command.
Ex: $ man date
Displays date command usage and options.
$ man cal
$ man man
Ctrl+Z → to comout from help page.


2. $ pwd  to display the present working directory
/home/user2
3. $ cal  to display calendar (current month calendar)
$ cal 2000  to display 2000 year calendar.
$ cal 08 2010  august month of 2010 year calendar
$ cal 78  78 year calendar.
$ cal 1  1st year calendar.
$ cal 10000  illegal year usage range upto 1-9999 only
If you pass only one parameter after cal it considers it as year. If you pass two parameters 1st parameter is month and 2nd parameter is year.
4. $ date  to display date (displays system or server’s date which it is working)
Options:
$ date +%m  to display month
12
$ date +%h  to display name of the month
December
$ date +%d  to display day of month (1 to 31)
22
$ date +%y  to display last two digits of the year.
11
$ date +%Y  to display four digits of the year.
2011
$ date +%D  to display date in MM/DD/YY format.
12/22/11
$ date +%T  to display time in the format hh:mm:ss
12:30:54
H, M and S  this options are used to display hour, minutes and seconds.
5. $ who  to display present working users.
User2 tty1
User3 tty3
User4 tty0
Here tty is the UNIX naming for terminals.
LINUX naming for terminals is Pts1, Pts2 ……
Terminal number is used identify the clients.

Download 122.5 Kb.

Share with your friends:
  1   2   3   4   5   6   7   8   9   ...   17




The database is protected by copyright ©ininet.org 2024
send message

    Main page