mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-20 00:50:27 +00:00
Update cheatsheets
This commit is contained in:
34
alias
Normal file
34
alias
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# alias
|
||||
|
||||
> Creates aliases -- words that are replaced by a command string.
|
||||
> Aliases expire with the current shell session unless defined in the shell's configuration file, e.g. `~/.bashrc`.
|
||||
> More information: <https://tldp.org/LDP/abs/html/aliases.html>.
|
||||
|
||||
- List all aliases:
|
||||
|
||||
`alias`
|
||||
|
||||
- Create a generic alias:
|
||||
|
||||
`alias {{word}}="{{command}}"`
|
||||
|
||||
- View the command associated to a given alias:
|
||||
|
||||
`alias {{word}}`
|
||||
|
||||
- Remove an aliased command:
|
||||
|
||||
`unalias {{word}}`
|
||||
|
||||
- Turn `rm` into an interactive command:
|
||||
|
||||
`alias {{rm}}="{{rm --interactive}}"`
|
||||
|
||||
- Create `la` as a shortcut for `ls --all`:
|
||||
|
||||
`alias {{la}}="{{ls --all}}"`
|
||||
Reference in New Issue
Block a user