Access over 20 million homework & study documents

4 On the class server, use this command to set up an alias alias g

Content type
User Generated
Rating
Showing Page:
1/3
4. On the class server, use this command to set up an
alias: alias ghist=history | grep Once its set, use it with
various commands that you know, like: ghist cd What kind
of output do you get when trying this with different
commands? What is the ghist alias doing when combined
with different commands? Explain.
Solution
The different types of alias commands in Unix
Command
alias
Sample Outputs
Alias..=cd..
Alias amazonbackup = s3backup
Alias apt-get=sudo apt-get
Scope: to clear the screen
Command
Alias= c= clear
Task: Define an alias
Command
Alias name=/path/to/script.p1 arg1
Task: Disable an alias temporarily

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/3
## path/to/full/command/usr/bin/clear
Task: remove an alias
Unalias aliasname
Output:
Unalias c
Command: control cd
alias..=cd.. // quick way to get out of current
directory
Command: Is
Alias Is =Iscolor=auto // colorize the output
Command: grep
Alias grep=grepcolor=auto // colorize the grep
command output
Command: bc
alias bc=bc-1 // calculater
Command: mkdir
alias mkdir=mkdir-pv’
command: netstat
alias ports=netstat-tulanp
The Ghost commands
.priv [name] host private name
.pub [name] host public name
.open[slot] open slot
.close[slot] close slot
What is the ghost alias doing when combined with different

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/3

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
4. On the class server, use this command to set up an alias: alias ghist=‘history | grep’ Once it’s set, use it with various commands that you know, like: ghist cd What kind of output do you get when trying this with different commands? What is the ghist alias doing when combined with different commands? Explain. Solution The different types of alias commands in Unix Command alias Sample Outputs Alias..=’cd..’ Alias amazonbackup = ‘s3backup’ Alias apt-get=’sudo apt-get’ Scope: to clear the screen Command Alias= c= ‘clear’ Task: Define an alias Command Alias name=’/path/to/script.p1 arg1’ Task: Disable an alias temporarily ## path/to/full/command/usr/bin/clear Task: remove an alias Unalias aliasname Output: Unalias c Command: control cd alias..=’cd..’ // quick way to get out of current directory Command: Is Alias Is =’Is—color=auto’ // colorize ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Super useful! Studypool never disappoints.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4