Server

Filesystem Commands

Updated: December 19, 2024

Namespace: <em>local</em>
Commands available on the local file system

cat

NAME cat – Print the content of a file

SYNTAX

cat [file]

ARGUMENTS

  • file - [optional] -The file to print

cd

NAME cd – Change the local working directory

SYNTAX

cd file

ARGUMENTS

  • file - [required] - A local directory to change to

cp

NAME cp – Copy a file or directory

SYNTAX

cp [options] source destination

OPTIONS

  • -r - [flag] - Recursive copy directories

ARGUMENTS

  • source - [required] - The file to copy
  • destination - [required] - The target file

ls

NAME ls – List file names in a local directory

SYNTAX

ls [file]

ARGUMENTS

  • file - [optional] -A local directory to list its content. Defaults to the working directory

mkdir

NAME mkdir – Create a directory in local file system

SYNTAX

mkdir file

ARGUMENTS

  • file - [required] - The directory path to create

mv

NAME mv – Rename a file or directory

SYNTAX

mv source destination

ARGUMENTS

  • source - [required] - The file to rename
  • destination - [required] - The target file

popd

NAME popd – Pop working directory

SYNTAX

popd

pushd

NAME pushd – Push a new local working directory

SYNTAX

pushd file

ARGUMENTS

  • file - [required] - A local directory to push

pwd

NAME pwd – Print the local working directory

SYNTAX

pwd [options]

OPTIONS

  • -s - [flag] - Use this flag to show the working directory stack

rm

NAME rm – Remove a file or directory

SYNTAX

rm [options] file

OPTIONS

  • -r - [flag] - Recursive remove directories

ARGUMENTS

  • file - [required] - The directory or file to delete

touch

NAME touch – Touch a file

SYNTAX

touch file

ARGUMENTS

  • file - [required] - The file to touch