Linux Shell Commands
This chapter is a reference for Linux shell commands that you can run at the OcNOS prompt.
The below table describes the commands:
- You must be in privileged exec mode to run these commands.
- You cannot use the pipe (“|”) or redirect (">") operators.
Command |
Description |
cat file |
Display contents of file |
cd |
Change to home directory |
cd dir |
Change directory to dir |
cp file1 file2 |
Copy file1 to file2 |
cp -r dir1 dir2 |
Copy dir1 to dir2; create dir2 if it does not exist |
dir |
Display contents of current directory |
less file |
Display the contents of file |
ls options |
Display contents of current directory |
mkdir dir |
Create a directory dir |
more file |
Display the contents of file |
mv file1 file2 |
Rename file1 to file2 |
mv file dir |
Move file to directory dir |
pwd |
Display current directory |
rmdir dir |
Remove a directory dir (only if empty) |