Linux common commands (type pwd whoami basenaem dirname alias)
Help class Commands:
View command type: (internal command, external command)
# type command
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/23/wKiom1T3tsCzqNsWAABZKWOJKhw382.jpg "title=" type " alt= "Wkiom1t3tsczqnswaabzkwojkhw382.jpg"/>
Command Help
Internal command:
# Help Command View commands
External command:
# Man Command View command Help
# info comand View command Help
# command--help view commands Help
View currently in that directory: (PWD)
# pwd
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/23/wKiom1T3tvmzqVZbAAAldgde0jU901.jpg "title=" pwd " alt= "Wkiom1t3tvmzqvzbaaaldgde0ju901.jpg"/>
To view the currently logged in User name: (whoami)
# WhoAmI
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1F/wKioL1T3uDzT_JojAABbJtOWP3k094.jpg "title=" Whoami.jpg "alt=" Wkiol1t3udzt_jojaabbjtowp3k094.jpg "/>
Take the base name of the current path: (Note: path is route)
# basename Path
Eg:basename/etc/pm/sleep.d
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/1F/wKioL1T3uGODq2_nAABJNQkuaSo735.jpg "title=" BaseName "alt=" Wkiol1t3ugodq2_naabjnqkuaso735.jpg "/>
Fetch current PATH directory name: (dirname)
# dirname Path
Eg:dirname/etc/pm/sleep.d
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1F/wKioL1T3uPXguBBbAABpHE5jlsY730.jpg "title=" DirName "alt=" Wkiol1t3upxgubbbaabphe5jlsy730.jpg "/>
Command aliases Alias
To view the command aliases that are already defined by the current system:
# Alias
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5A/1F/wKioL1T3uSLAFYhpAADB6jaicdg144.jpg "title=" Alias01 "alt=" Wkiol1t3uslafyhpaadb6jaicdg144.jpg "/>
To create a command alias:
# alias alias = ' Normal Command '
Eg:alias Cls=clear
To revoke a command alias:
# Unalias Aliases
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5A/1F/wKioL1T3uUWRrXvnAAHVZLzHkPg487.jpg "title=" Alias02 "alt=" Wkiol1t3uuwrrxvnaahvzlzhkpg487.jpg "/>
This article is from the "Cai Linux" blog, please be sure to keep this source http://mlybfq.blog.51cto.com/4904679/1617484
Linux common commands (type pwd Whami basename dirname alias)