Copying, Renaming and Deleting Files and Directories

The procedure for creating and deleting files and directories is similar to DOS, as well, however the commands are named slightly different. Note that during deletions, there is no undelete, or recycle bin. In addition, wildcards may be used as well. This makes deleting files a potentially dangerous activity. Please use caution. The following commands are available:

ActionCommandSyntax / Example
Copy a filecp
cp [path]<filename> <destination_path>

Examples:
cp index.html /usr/root [Enter]
cp /mnt/stat.sh /usr/bin [Enter]
Delete a filerm
rm <filename>

Example:
rm index.html [Enter]
Rename a filemv
mv <currentfilename> <newfilename>

Example:
mv index.html index.htm [Enter]
Create a directorymkdir
mkdir <newdirectoryname>

Example:
mkdir temp [Enter]
Delete a directoryrmdir
rmdir <directorytodelete>

Example:
rmdir temp [Enter]
Rename a directorymv
mv <olddirectoryname> <newdirectoryname>

Example:
mv webpages htmldocs [Enter]