Unformatted text preview:

1 Who The who command displays the username and other information about users currently logged onto the system This information includes user s name terminal line login time elapsed time since activity occurred on the line and the process ID of the command interpreter shell for each current UNIX system user home hayhurst who woodyard pts 2 adjeroh pts 3 lbixia pts 4 viars pts 5 ji pts 10 adjeroh pts 8 kerrigan pts 11 hluo pts 13 ksmani pts 14 duan pts 15 hluo pts 16 selliah pts 18 zemerick pts 21 hayhurst pts 22 ram pts 23 ip pts 35 ji pts 41 adjeroh pts 19 Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug Aug 23 15 22 22 23 15 23 23 23 23 23 23 23 23 23 22 22 20 09 54 01 02 13 17 11 56 08 35 01 02 08 16 08 36 10 17 10 05 10 08 09 15 09 23 09 45 10 09 15 22 09 57 14 33 ip 63 13 is wvu edu landofra csee wvu edu 157 182 42 11 65 193 127 242 208 11 220 235 boole 157 182 72 218 pppa41 resalemorgantown1 2r7491 dialinx net 157 182 194 82 157 182 42 148 157 182 224 72 1cust6 tnt3 manassas va da uu net 157 182 194 237 157 182 194 147 129 71 125 143 157 182 42 160 208 11 220 235 boole 2 W The W command is similar to who but yields more information The W command is part of the BSD compatibility package and may not be installed on every system The information displayed by w includes the user name terminal line login date and time idle time time in minutes since the last key stroke Next two columns tell how much processor time has been used And the last column show what task the person is currently running home hayhurst w 10 20am up 61 day s 23 07 16 users load average 2 53 2 55 2 57 User tty login idle JCPU PCPU what woodyard pts 2 9 54am 17 pine bin P usr local lib pine adjeroh pts 3 15Aug01 3days 8 46 3 20 xbiff lbixia pts 4 Wed 1pm 21 03 pine bin P usr local lib pine viars pts 5 Wed11am 17 22 1 pine bin P usr local lib pine ji pts 10 8 35am 1 45 pine bin P usr local lib pine adjeroh pts 8 15Aug01 15 36 telnet naur kerrigan pts 11 8 16am 2 04 emacs main html hluo pts 13 8 36am 1 15 pine bin P usr local lib pine ksmani pts 14 10 17am 3 tcsh duan pts 15 10 05am 15 pine bin P usr local lib pine selliah pts 18 9 15am 18 pine bin P usr local lib pine zemerick pts 21 9 23am 15 6 tcsh hayhurst pts 22 9 45am 4 w 3 whoami The this command displays information about your session Whoami all as one work displays the username home hayhurst whoami hayhurst While Who am I displays the username terminal info and login date time for the current user home hayhurst who am i hayhurst dev pts 11 Aug 23 10 43 4 Finger The finger command allows you to display information for a specific user It is also a great way to obtain the user ID login name for a person if you only know their name You can user finger to locate people using either their first or last name or directly by using their user id home hayhurst finger camille Login name hayhurst In real life Camille A Hayhurst Directory home hayhurst Shell bin tcsh On since Aug 23 09 45 29 on pts 22 from 157 182 194 147 Mail last read Thu Aug 23 10 03 42 2001 Plan Camille Hayhurst Office 717 Engineering Sciences Building Home Rt2 Box 167B Rivesvile Phone work 293 0405 ext 2576 278 7331 home emergencies only please Class Fall 2001 CS330 T TH CS604 T TH Office Hours 5 615 2 3 15 HECTIC HECTIC HECTIC T TH 9 30 1 50 3 30 4 50 Monday Wednesday by appointment Favorite Quote from CS 176 Student Spring 1999 During team efforts a BIG MOUTH is a real advantage sometimes it even out weighs true knowledge When you finger someone information about their full name and user id is displayed along with the contents of a plan file 5 MAN Help on unix commands can be obtained using the man utility This displays help in 2 ways 1 you can ask for the help page S for a specific command to be displayed As in home hayhurst man ls Reformatting page Wait done NAME ls list contents of directory SYNOPSIS usr bin ls aAbcCdfFgilLmnopqrRstux1 usr xpg4 bin ls aAbcCdfFgilLmnopqrRstux1 DESCRIPTION For each file that is a directory ls lists the contents of the directory for each file that is an ordinary file ls repeats its name and any other information requested The output is sorted alphabetically by default When no argument is given the current directory is listed When several arguments are given the arguments are first sorted appropriately but file arguments appear before directories and their contents There are three major listing formats The default format for output directed to a terminal is multi column with entries sorted down the columns The 1 option allows single column output and m enables stream output format In order to determine output formats for the C x and m options ls uses an environment variable COLUMNS to determine the number of character positions available on one output line If this variable is not set the terminfo 4 database is used to determine the number of columns based on the environment variable TERM If this information cannot be obtained 80 columns are assumed There was too much information to copy so try this on your own You can also use man with the keyword option k to lood for entries which reference directories home hayhurst man k directory home hayhurst man windex No such file or directory alphasort scandir 3b scan a directory cd cd 1 change working directory chdir cd 1 change working directory chdir chdir 2 change working directory chroot chroot 1m change root directory for a command chroot chroot 2 change root directory closedir closedir 3c close a directory stream dircmp dircmp 1 directory comparison dirent dirent 4 file system independent directory entry dirname dirname 3c report the parent directory name of a file path name dirs cd 1 change working directory drvconfig drvconfig 1m configure the devices directory Again there is a lot more I didn t copy The difficulty is that many commands display more than one screens worth of information at a time The more displays something one screen at a time This command uses a pipe to redirect the standard output of the man command to the standard input of the more command The list resulting from the search of the man pages Is displayed one screen at a time pausing until …


View Full Document

WVU CS 110 - Unix General Utilities Examples 1

Loading Unlocking...
Login

Join to view Unix General Utilities Examples 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Unix General Utilities Examples 1 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?