Skip to content

Commit 043d95f

Browse files
authored
Update filesystem.md
minor grammar revisions
1 parent e69e7e5 commit 043d95f

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

docs/filesystem.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ This section will be a basic overview of the Linux filesystem concepts, not an i
1717
- Learn about options (flags) and arguments to shell commands
1818
- Learn about the **tab completion**
1919
20-
![Tree of dir structure](images/tree.png){: style="width: 500px;float: right"}
20+
![Tree of dir structure](images/tree.png){: style="width: 400px;float: right"}
2121

22-
The Linux filesystem directory structure starts with the top root directory, which is shown as <code>/</code>. Below this are several other standard directories. Of particular interest are <code>usr/bin</code>, <code>home</code>, <code>usr/lib</code>, and <code>usr/lib64</code>. A common directory which you will also often find is <code>usr/local/bin</code>.
22+
The Linux filesystem directory structure starts with the top root directory, which is shown as `/`. Below this are several other standard directories. Of particular interest are `usr/bin`, `home`, `usr/lib`, and `usr/lib64`. A common directory which you will also often find is `usr/local/bin`.
2323

24-
The picture on the right shows typical subdirectories under <code>/</code> (note that the command `tree` does not work at all HPC centers, though it does work on Tetralith---see the page [tree](../tree) under the "Extras" section for how to install if it is missing). Some of the directories have a **symbolic link** to a different name---this is often done to make it quicker to write, but can also be for compatibility reasons since some software have hardcoded paths.
24+
The picture on the right shows typical subdirectories under `/` (note that the command `tree` does not work at all HPC centers, though it does work on Tetralith---see the page [tree](../tree) under the "Extras" section for how to install if it is missing). Some of the directories have a **symbolic link** to a different name---this is often done to make it quicker to write, but can also be for compatibility reasons since some software have hardcoded paths.
2525

2626
!!! Note
2727

@@ -40,16 +40,16 @@ The file system could also be illustrated like this:
4040

4141
![folders of filesystem structure](images/filesystem-folders.png){: style="width: 500px;float: left"}
4242

43-
!!! warning "Note"
43+
!!! important "Note about `/`"
4444

4545
The character `/` can be
4646

47-
1. the root directory, if it is at the front of a file or directory name
48-
2. a separator if it appears inside a path.
47+
1. the root directory, if it appears alone or at the front of a file or directory name
48+
2. a separator if it appears in other positions within the path.
4949

5050
!!! note
5151

52-
If you are on a local cluster, on an HPC center, etc. where you are not root, you will as default be in your home directory when you login. You can use `cd ..` a couple times to go to the root of the system and do `tree` there if you want, or do `tree` in your home directory (you can always return there with just `cd`).
52+
If you are on a local cluster, on an HPC center, etc. where you are not root, you will be in your home directory by default when you login. You can use `cd ..` a couple times to go to the root of the system and do `tree` there if you want, or do `tree` in your home directory (you can always return there with just `cd`).
5353

5454
!!! caution
5555

@@ -84,7 +84,7 @@ There are is also an "environment variable" that can be used as shortcut for the
8484

8585
## pwd
8686

87-
The command ``pwd`` (print working directory) will print out the full pathname of the working directory to the screen.
87+
The command `pwd` (**p**rint **w**orking **d**irectory) will print out the full pathname of the working directory to the screen.
8888

8989
You can use this to find out which directory you are in.
9090

@@ -142,7 +142,7 @@ On Tetralith, user ``x_birbr``:
142142

143143
## ls - listing files/directories
144144

145-
The `ls` command is used to list files. If you just give the command `ls` with no flags it will list all files in the current directory except for hidden files.
145+
The `ls` command is used to list files and/or directories. If you just give the command `ls` with no flags, it will list all files and subdirectories in the current directory except for hidden files.
146146

147147
<div>
148148
```bash
@@ -154,30 +154,30 @@ This way you can to list files/subdirectories for any directory, but the default
154154

155155
Some examples:
156156

157-
- <code>ls /</code> lists contents of the root directory
158-
- <code>ls ..</code> lists the contents of the parent directory of the current
159-
- <code>ls ~</code> lists the contents of your user home directory
160-
- <code>ls *</code> lists contents of current directory and subdirectories
157+
- `ls /` lists contents of the root directory
158+
- `ls ..` lists the contents of the parent directory of the current
159+
- `ls ~` lists the contents of your user home directory
160+
- `ls *` lists contents of current directory and subdirectories
161161

162162
!!! Note "Commonly used flags"
163163

164-
- <code>-a</code> lists content including hidden files and directories
165-
- <code>-l</code> lists content in long table format (permissions, owners, size in bytes, modification date/time, file/directory name)
166-
- <code>-lh</code> adds an extra column to above representing size of each file/directory
167-
- <code>-t</code> lists content sorted by last modified date in descending order
168-
- <code>-tr</code> lists content sorted by last modified date in ascending order
169-
- <code>-s</code> list files with their sizes
164+
- `-a` lists content including hidden files and directories
165+
- `-l` lists content in long table format (permissions, owners, size in bytes, modification date/time, file/directory name)
166+
- `-lh` adds an extra column to above representing size of each file/directory
167+
- `-t` lists content sorted by last modified date in descending order
168+
- `-tr` lists content sorted by last modified date in ascending order
169+
- `-s` list files with their sizes
170170

171-
To get more flags, type <code>ls \--help</code> or <code>man ls</code> in the terminal to see the manual.
171+
To get more flags, type `ls --help` or `man ls` in the terminal to see the manual.
172172

173173
!!! tip
174174

175175
You can often get more info on flags/options and usage for a Linux command with
176176

177-
- <code>COMMAND \--help</code>
178-
- <code>man COMMAND</code>
177+
- `COMMAND --help`
178+
- `man COMMAND`
179179

180-
where COMMAND is the Linux command you want information about, like <code>ls</code>, <code>mkdir</code>, etc.
180+
where COMMAND is the Linux command you want information about, like `ls`, `mkdir`, etc.
181181

182182
!!! Example "The output for a few of the flags, for a directory with two subdirectories and some files"
183183

@@ -253,13 +253,13 @@ To get more flags, type <code>ls \--help</code> or <code>man ls</code> in the te
253253

254254
## Wild cards
255255

256-
Wild cards are useful "stand-ins" for one or more character or number, that you can use for instance when finding patterns or when removing/listing all files of a certain type.
256+
Wild cards are useful "stand-ins" for one or more characters or numbers, that you can use for instance when finding patterns or when removing/listing all files of a certain type.
257257

258258
Wild cards are also called "glob" or "globbing" patterns.
259259

260260
??? Globs
261261

262-
Globs, also known as glob (or globbing) patterns are patterns that can expand a wildcard pattern into a list of pathnames that match the given pattern.
262+
Globs, also known as glob (or globbing) patterns are special characters that can expand a wildcard pattern into a list of pathnames that match the given pattern.
263263

264264
On the early versions of Linux, the command interpreters relied on a program that expanded these characters into unquoted arguments to a command: `/etc/glob`.
265265

@@ -272,11 +272,11 @@ Wild cards are also called "glob" or "globbing" patterns.
272272
- **`[ ]`** represents a range of alphanumeric characters in ascending order.
273273
- **`{ }`** the terms are separated by commas and each term must be a wildcard or exact name.
274274
- **`[!]`** matches any character that is NOT listed between `[!` and `]`. This is a logical NOT.
275-
- **`\`** specifies an "escape" character, when using a subsequent special character.
275+
- **`\`** specifies an "escape" character, when using a subsequent special character.
276276

277277
!!! Warning
278278

279-
You may need quotation marks around some wildcards as well.
279+
You may need quotation marks around some wildcards as well.
280280

281281
!!! Warning
282282

@@ -286,7 +286,7 @@ Wild cards are also called "glob" or "globbing" patterns.
286286

287287
!!! tip "Try some of the commands below"
288288

289-
Useful files for these examples are found in ``exercises/patterns``
289+
Useful files for these examples are found in `exercises/patterns`.
290290

291291
!!! Example "Some examples of the use of wildcards"
292292

@@ -387,10 +387,10 @@ The command `cd` is used to change directory.
387387

388388
!!! summary
389389

390-
- Your home directory is generally located in ``/home/USERNAME`` or ``/home/U/USERNAME``
390+
- Your home directory is generally located in `/home/USERNAME` or `/home/U/USERNAME`
391391
- Your home directory is also stored as the environment variable ``$HOME``
392-
- ``pwd`` displays your path and current location
393-
- ``cd DIR`` changes your current working directory to DIR
394-
- Using ``cd`` without providing a destination takes you to your home directory
395-
- ``ls`` is used to list files and directories
396-
- Wildcards are metacharacters for one or more character or number and are useful when you are finding patterns or removing/copying/listing all files of a certain type
392+
- `pwd` displays your path and current location
393+
- `cd DIR` changes your current working directory to DIR
394+
- Using `cd` without providing a destination takes you to your home directory
395+
- `ls` is used to list files and directories
396+
- Wildcards are metacharacters for one or more character or number, and are useful when you are finding patterns or removing/copying/listing all files of a certain type

0 commit comments

Comments
 (0)