tools:bash:getting-started
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tools:bash:getting-started [2024/05/19 21:47] – created - external edit 127.0.0.1 | tools:bash:getting-started [2025/09/30 22:44] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 82: | Line 82: | ||
| $ su username | $ su username | ||
| + | | ||
| + | Open new remote shell for user // | ||
| + | |||
| + | $ ssh username@host | ||
| - | You can use '' | + | You can use '' |
| ===== Filesystem Traversal ===== | ===== Filesystem Traversal ===== | ||
| - | Show present working directory: | + | Echo your shell' |
| $ pwd | $ pwd | ||
| - | Show file tree for //path//: | + | Show file tree for the directory |
| $ tree path/ | $ tree path/ | ||
| Line 103: | Line 107: | ||
| $ ls | $ ls | ||
| - | Display directory listing. Some options include: | + | Outputs a list of contents of the pwd. Some options include: |
| * '' | * '' | ||
| Line 114: | Line 118: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| + | |||
| + | To show the contents of the directory // | ||
| + | |||
| + | $ ls -lhAF foldername/ | ||
| + | ==== cd ==== | ||
| + | |||
| + | Move your shell to a new working directory: | ||
| + | |||
| + | $ cd path/ | ||
| + | | ||
| + | Move your shell up one level to the parent directory of your pwd: | ||
| + | |||
| + | $ cd ../ | ||
| + | | ||
| + | Move your shell to your home directory: | ||
| + | |||
| + | $ cd ~/ | ||
| ===== Viewing Contents of Files ===== | ===== Viewing Contents of Files ===== | ||
| Line 206: | Line 227: | ||
| $ grep searchterm path/ | $ grep searchterm path/ | ||
| + | For more information, | ||
| ===== Basic File and Directory Commands ===== | ===== Basic File and Directory Commands ===== | ||
| Line 255: | Line 277: | ||
| ==== ln ==== | ==== ln ==== | ||
| - | Create | + | Create |
| - | $ ln sourcefilename ./linkname | + | $ ln -s sourcefilename ./linkname |
| - | The flag '' | + | This command normally creates [[wp> |
| + | To use '' | ||
| + | |||
| + | $ ln -s path/ | ||
| ==== mv ==== | ==== mv ==== | ||
| Line 282: | Line 307: | ||
| * '' | * '' | ||
| - | Delete | + | Delete |
| + | |||
| + | $ rm ./* | ||
| + | |||
| + | Delete all files within directory // | ||
| + | |||
| + | $ rm foldername/ | ||
| + | |||
| + | Delete all files matching extension //.bar// within pwd: | ||
| + | |||
| + | $ rm ./*bar | ||
| + | |||
| + | Delete | ||
| $ rmdir foldername | $ rmdir foldername | ||
| '' | '' | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * Next Page: [[tools: | ||
| + | * [[tools: | ||
tools/bash/getting-started.1716155256.txt.gz · Last modified: (external edit)
Find this page online at: https://bestpoint.institute/tools/bash/getting-started
Find this page online at: https://bestpoint.institute/tools/bash/getting-started