tools:bash:getting-started
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools:bash:getting-started [2024/05/20 03:23] – [rm and rmdir] Humphrey Boa-Gart | tools:bash:getting-started [2024/08/06 05:54] (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 all files within | + | Delete all files within |
$ rm ./* | $ rm ./* | ||
| | ||
- | Delete all files matching extension //.bar// within | + | Delete all files within directory // |
+ | |||
+ | $ rm foldername/ | ||
+ | |||
+ | Delete all files matching extension //.bar// within | ||
$ rm ./*bar | $ rm ./*bar | ||
Line 295: | Line 324: | ||
'' | '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | * Next Page: [[tools: | ||
+ | * [[tools: |
tools/bash/getting-started.1716175411.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