Essential Administrative Tools - Michigan Technological University
Essential Administrative Tools
Use command man Piping into grep
r The grep command searches its input for lines containing a given pattern.
r The grep is commonly used to search files r Use grep with pipe is very useful
? Example: find out about a process owned by one certain user $ps ?ef | grep chavez $ps ?aux | grep chavez $ps ?aux | egrep `chavez|PID' $alias pu "ps ?aux | egrep `\!:1|PID" $ pu chavez
Administrative tools 1-1
Essential Administrative Tools
Piping into awk
r Manipulate the output of another command r Picking out the columns
Example: ? List the users that run dooms.
$ps ?ef | grep "[d]oom" | awk `{print $1}' $ps ?ef | grep doom| grep ?v grep | awk `{print $1}' ? Create a file to store the users that run dooms, include the data cpu time $ (date ; ps ?ef | grep "[d]oom" | awk `{print $1 " [ " $7
"]" }' | sort | uniq) >> doomed.users
Administrative tools 1-2
Essential Administrative Tools
Piping into awk
r Sum up a column of numbers
Example: search files owned by chavez and calculate the total size.
#find . -user chavez ?ls ?fstype 4.2| awk `{sum+=$7}; END {print "User chavez total disk use =" sum}'
r Generate a filename with current date, such as 24Oct2004.icu4.sysdoc
? $ sys_doc > `date | awk `{print $3 $2 $6}' `.`hostname`.sysdoc
Or on some systems date has the function ? $ date +report_%d%b%y%H%M%S.output
will be report_17Jan05223305.output
Administrative tools 1-3
Essential Administrative Tools
Finding files: find
r Find locates files having certain characteristics on where you tell it to look.
r Basic syntax
#find starting-dir(s) criteria-and-action
r Matching criteria r Action
? What to do with the files matches all the criteria
Administrative tools 1-4
Essential Administrative Tools
-atime n -mtime n -newer file -size n -type c -name nam -perm p -user usr -group grp -nouser
-nogroup
File was last accessed n days ago File was last modified exactly n days ago
File was modified more recently than file was File is exactly n 512-byte blocks long Specifies file typeL f, d The filename is nam The file's access mode is p The file's owner is usr The file's group owner is grp The file's owner is not listed in the password file The file's group owner is not listed in the group file
Administrative tools 1-5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- department of health human services food and drug administration
- administrative tool qlarant
- technology tools for streamlining administrative processes
- using windows administrative tools with celerra
- financial and administrative monitoring tool arizona
- sage 100 2020 installation and system administrator s guide
- using administrative law tools and concepts to strengthen usaid programming
- using windows administrative tools with celerra dell
- net learning administrative tools university of virginia
- common windows 2000 administrative utilities
Related searches
- michigan state university job postings
- michigan state university philosophy dept
- michigan state university online degrees
- michigan state university employee discounts
- michigan state university employee lookup
- michigan state university employee portal
- michigan state university employee salaries
- michigan state university admissions
- michigan state university employee benefits
- michigan state university website
- michigan state university employee directory
- michigan state university deadline