File System

CommandDescription
ls [dir]List files with colored output, attributes, and sizes
cd [dir]Change directory (cd - for previous, cd for home)
pwdPrint working directory
mkdir [-cd] dirCreate directory (-cd to enter it immediately)
touch [-d/-t] fileCreate file or update timestamp
rm [-r] pathRemove file or directory
mv src dstMove or rename file/directory
cp [-r] src dstCopy file or directory
ln [-s] target linkCreate hard or symbolic link
stat fileDisplay file metadata
chmod +/-r fileToggle file attributes (r/h/s)
find path [opts]Recursive file search
du [-sh] [dir]Disk usage of files/directories
dfShow disk space of mounted drives
mktemp [-d]Create temporary file or directory
basename path [suffix]Strip directory and optional suffix
dirname pathStrip last component from path

ls

On Windows, ls is a builtin that shows file attributes, sizes, timestamps, and color-coded names by file type. On other platforms it falls through to the system ls.

Shell
> ls
d-----       -  Jan 15 09:44  src/
d-----       -  Jan 10 11:20  tests/
-a-r--   2.5K  Jan 15 14:23  Program.cs
-a-r--   1.8K  Jan 12 10:05  README.md

find

Recursive file search with filtering by name pattern, type, and extension:

Shell
> find src -ext cs
src/Parser.cs
src/Lexer.cs
src/Interpreter.cs

> find . -name "*.json" -type f
./config.json
./package.json