ops102:filesystem_basics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ops102:filesystem_basics [2024/01/15 04:22] – [Basic Commands for Dealing with Files and Directories] chris | ops102:filesystem_basics [2024/05/04 01:41] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 13: | Line 13: | ||
===== Filenames | ===== Filenames | ||
- | The rules for valid filenames vary with the filesystem, but generally, filenames may include letters, numbers, dashes, underscores, | + | The rules for valid filenames vary with the type of filesystem, but generally, filenames may include letters, numbers, dashes, underscores, |
Spaces may be included in filenames, but may require quoting if accessed from the command-line, | Spaces may be included in filenames, but may require quoting if accessed from the command-line, | ||
Line 59: | Line 59: | ||
cd ops102 | cd ops102 | ||
- | To see the name of the current directory, use ' | + | To see the name of the current directory, use the command ''pwd'' (Print Working Directory) on Linux or ''cd'' on Windows. |
- | To change your current directory to your home directory on Linux, use the ' | + | To change your current directory to your home directory on Linux, use the ''cd'' command by itself (with no arguments). |
===== Pathnames | ===== Pathnames | ||
Line 180: | Line 180: | ||
Relative pathnames are often the shortest form of pathname //if// the target file is in the current working directory or a subdirectory of the current working directory, but the meaning of a relative pathname changes based on the current working directory. | Relative pathnames are often the shortest form of pathname //if// the target file is in the current working directory or a subdirectory of the current working directory, but the meaning of a relative pathname changes based on the current working directory. | ||
+ | |||
+ | ===== Directory vs File Names ===== | ||
+ | |||
+ | It is often impossible to tell whether a pathname refers to a file or to a directory. For example, the Linux pathname ''/ | ||
+ | |||
+ | If you wish to explicitly indicate that a pathname refers to a directory, append a slash or backslash to the pathname. | ||
===== Volume Designators | ===== Volume Designators | ||
Line 203: | Line 209: | ||
^ Description ^ Linux Command ^ Windows Command ^ Notes ^ | ^ Description ^ Linux Command ^ Windows Command ^ Notes ^ | ||
- | | Make Directory | mkdir // | + | | Make a Directory | mkdir // |
- | | Remove (Empty) Directory | + | | Remove |
| Change (Working) Directory | cd // | | Change (Working) Directory | cd // | ||
| Print Current Working Directory | pwd | cd | | | | Print Current Working Directory | pwd | cd | | |
ops102/filesystem_basics.1705292533.txt.gz · Last modified: 2024/04/16 18:10 (external edit)