-
-
Notifications
You must be signed in to change notification settings - Fork 1k
type,man,help,history added #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chinmoyd1
wants to merge
6
commits into
Idnan:master
Choose a base branch
from
chinmoyd1:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d16c0fd
type,help,man,history added
chinmoyd1 7122fea
Update README.md
chinmoyd1 1436c6b
type,history,help,man added
chinmoyd1 b81c3bd
Update README.md
chinmoyd1 b48b08c
Help examples output removed
chinmoyd1 d94e3f4
help examples removed
chinmoyd1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,85 @@ | |
|
|
||
| # 1. Basic Operations | ||
|
|
||
| ### a. `export` | ||
| ### a. `type` | ||
| Displays the kind of command the shell will execute, given a particular command name. | ||
| ```bash | ||
| type command | ||
| ``` | ||
| Example: | ||
| ```bash | ||
| $ type cp | ||
| cp is /bin/cp | ||
| ``` | ||
| ### b. `help` | ||
| It is used to get information about each of the shell builtin commands. | ||
| ```bash | ||
| help command | ||
| ``` | ||
| Optionally, the -m option is added to change the format of the output. | ||
| Example: | ||
| ```bash | ||
| $ help -m cd | ||
| NAME | ||
| cd - Change the shell working directory. | ||
|
|
||
| SYNOPSIS | ||
| cd [-L|-P] [dir] | ||
|
|
||
| DESCRIPTION | ||
| Change the shell working directory. | ||
|
|
||
| Change the current directory to DIR. The default DIR is the value of the | ||
| HOME shell variable. | ||
|
|
||
| The variable CDPATH defines the search path for the directory containing | ||
| DIR. Alternative directory names in CDPATH are separated by a colon (:). | ||
| A null directory name is the same as the current directory. If DIR begins | ||
| with a slash (/), then CDPATH is not used. | ||
|
|
||
| If the directory is not found, and the shell option `cdable_vars' is set, | ||
| the word is assumed to be a variable name. If that variable has a value, | ||
| its value is used for DIR. | ||
|
|
||
| Options: | ||
| -L force symbolic links to be followed | ||
| -P use the physical directory structure without following symbolic | ||
| links | ||
|
|
||
| The default is to follow symbolic links, as if `-L' were specified. | ||
|
|
||
| Exit Status: | ||
| Returns 0 if the directory is changed; non-zero otherwise. | ||
|
|
||
| SEE ALSO | ||
| bash(1) | ||
| IMPLEMENTATION | ||
| GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu) | ||
| Copyright (C) 2013 Free Software Foundation, Inc. | ||
| ``` | ||
|
|
||
| ### c. `--help` | ||
| Many executable programs support a “--help” option that displays a description of the command's supported syntax and options. | ||
| ```bash | ||
| command --help | ||
| ``` | ||
| Example: | ||
| ```bash | ||
| $ mkdir --help | ||
| Usage: mkdir [OPTION] DIRECTORY... | ||
|
||
| Create the DIRECTORY(ies), if they do not already exist. | ||
|
|
||
| -Z, --context=CONTEXT (SELinux) set security context to CONTEXT | ||
| Mandatory arguments to long options are mandatory for short options | ||
| too. | ||
| -m, --mode=MODE set file mode (as in chmod), not a=rwx – umask | ||
| -p, --parents no error if existing, make parent directories as | ||
| needed | ||
| -v, --verbose print a message for each created directory | ||
| --help display this help and exit | ||
| --version output version information and exit | ||
| ``` | ||
| ### d. `export` | ||
| Displays all environment variables. If you want to get details of a specific variable, use `echo $VARIABLE_NAME`. | ||
| ```bash | ||
| export | ||
|
|
@@ -39,7 +117,7 @@ $ echo $AWS_HOME | |
| /Users/adnanadnan/.aws | ||
| ``` | ||
|
|
||
| ### b. `whatis` | ||
| ### e. `whatis` | ||
| whatis shows description for user commands, system calls, library functions, and others in manual pages | ||
| ```bash | ||
| whatis something | ||
|
|
@@ -50,7 +128,7 @@ $ whatis bash | |
| bash (1) - GNU Bourne-Again SHell | ||
| ``` | ||
|
|
||
| ### c. `whereis` | ||
| ### f. `whereis` | ||
| whereis searches for executables, source files, and manual pages using a database built by system automatically. | ||
| ```bash | ||
| whereis name | ||
|
|
@@ -61,7 +139,7 @@ $ whereis php | |
| /usr/bin/php | ||
| ``` | ||
|
|
||
| ### d. `which` | ||
| ### g. `which` | ||
| which searches for executables in the directories specified by the environment variable PATH. This command will print the full path of the executable(s). | ||
| ```bash | ||
| which program_name | ||
|
|
@@ -72,7 +150,10 @@ $ which php | |
| /c/xampp/php/php | ||
| ``` | ||
|
|
||
| ### e. clear | ||
| ### h. `history` | ||
| History prints previous executed commands. | ||
|
|
||
| ### i. `clear` | ||
| Clears content on window. | ||
|
|
||
| ## 1.1. File Operations | ||
|
|
@@ -806,7 +887,7 @@ last yourUsername | |
| ``` | ||
|
|
||
| ### l. `man` | ||
| Shows the manual for specified command. | ||
| Most executable programs intended for command line use provide a formal piece of documentation called a manual or man page. | ||
| ```bash | ||
| man command | ||
| ``` | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the details of cd command. Only what help command is and how to use it and a example is ok. All below lines create confusion.