# Coming from Bash
If you're coming from `Git Bash` on Windows, then the external commands you're used to (bash, grep, etc) will not be available in `nu` by default (unless you had explicitly made them available in the Windows Path environment variable).
To make these commands available in `nu` as well, add the following line to your `config.nu` with either `append` or `prepend`.
```
$env.Path = ($env.Path | prepend 'C:\Program Files\Git\usr\bin')
```
Note: this table assumes Nu 0.60.0 or later.
| Bash | Nu | Task |
| ------------------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------- |
| `ls` | `ls` | Lists the files in the current directory |
| `ls
` | `ls ` | Lists the files in the given directory |
| `ls pattern*` | `ls pattern*` | Lists files that match a given pattern |
| `ls -la` | `ls --long --all` or `ls -la` | List files with all available information, including hidden files |
| `ls -d */` | `ls \| where type == dir` | List directories |
| `find . -name *.rs` | `ls **/*.rs` | Find recursively all files that match a given pattern |
| `find . -name Makefile \| xargs vim` | `ls **/Makefile \| get name \| vim $in` | Pass values as command parameters |
| `cd ` | `cd ` | Change to the given directory |
| `cd` | `cd` | Change to the home directory |
| `cd -` | `cd -` | Change to the previous directory |
| `mkdir ` | `mkdir ` | Creates the given path |
| `mkdir -p ` | `mkdir ` | Creates the given path, creating parents as necessary |
| `touch test.txt` | `touch test.txt` | Create a file |
| `> ` | `\| save --raw ` | Save string into a file |
| `>> ` | `\| save --raw --append ` | Append string to a file |
| `> /dev/null` | `\| ignore` | Discard command output |
| `> /dev/null 2>&1` | `out+err> /dev/null` | Discard command output, including stderr |
| `command arg1 arg2 2>&1 \| less` | `run-external --redirect-combine command [arg1 arg2] \| less` | Pipe stdout+stderr of a command into less, output updated live |
| `cat ` | `open --raw ` | Display the contents of the given file |
| | `open ` | Read a file as structured data |
| `mv ` | `mv ` | Move file to new location |
| `cp ` | `cp ` | Copy file to new location |
| `cp -r ` | `cp -r ` | Copy directory to a new location, recursively |
| `rm ` | `rm ` | Remove the given file |
| | `rm -t ` | Move the given file to the system trash |
| `rm -rf ` | `rm -r ` | Recursively removes the given path |
| `date -d ` | `"" \| into datetime -f ` | Parse a date ([format documentation](https://docs.rs/chrono/0.4.15/chrono/format/strftime/index.html)) |
| `sed` | `str replace` | Find and replace a pattern in a string |
| `grep ` | `where $it =~ ` or `find ` | Filter strings that contain the substring |
| `man ` | `help ` | Get the help for a given command |
| | `help commands` | List all available commands |
| | `help --find ` | Search for match in all available commands |
| `command1 && command2` | `command1; command2` | Run a command, and if it's successful run a second |
| `stat $(which git)` | `stat (which git).path` | Use command output as argument for other command |
| `echo /tmp/$RANDOM` | `$"/tmp/(random integer)"` | Use command output in a string |
| `cargo b --jobs=$(nproc)` | `cargo b $"--jobs=(sys \| get cpu \| length)"` | Use command output in an option |
| `echo $PATH` | `$env.PATH` (Non-Windows) or `$env.Path` (Windows) | See the current path |
| `` | `vim $nu.config-path` | Update PATH permanently |
| `export PATH = $PATH:/usr/other/bin` | `$env.PATH = ($env.PATH \| append /usr/other/bin)` | Update PATH temporarily |
| `export` | `$env` | List the current environment variables |
| `` | `vim $nu.config-path` | Update environment variables permanently |
| `FOO=BAR ./bin` | `FOO=BAR ./bin` | Update environment temporarily |
| `export FOO=BAR` | `$env.FOO = BAR` | Set environment variable for current session |
| `echo $FOO` | `$env.FOO` | Use environment variables |
| `echo ${FOO:-fallback}` | `$env.FOO? \| default "ABC"` | Use a fallback in place of an unset variable |
| `unset FOO` | `hide-env FOO` | Unset environment variable for current session |
| `alias s="git status -sb"` | `alias s = git status -sb` | Define an alias temporarily |
| `type FOO` | `which FOO` | Display information about a command (builtin, alias, or executable) |
| `` | `vim $nu.config-path` | Add and edit alias permanently (for new shells) |
| `bash -c ` | `nu -c ` | Run a pipeline of commands |
| `bash