Web Hosting Help - Technical Questions
You're currently browsing the answers and replies to a question asked related to technical questions. If you wish to post a better answer or share greater insight into this question, feel free to post it.
Posted On: Sat 12 June, 2004
Asked By: Arthur J. |
I am new to the whole UNIX and Linux business. Can anyone outline some basic shell commands or SSH operations to help me get started? |
Posted On: Sun 13 June, 2004
Answered By: Anonymous |
| Luckily, UNIX and Linux share similar shell commands and operations so what you learn on one platform can also be done on another *NIX operating system or variant of it. The follow list of basic shell commands you might find useful when managing your websites through a SSH or telnet connection.
Navigation:
ls - list all the files in the current directory.
ls -al - list all the files in the current directory including the owners and file permission.
pwd - show the full path of the current directory.
cd - change back into the default shell or home directory.
cd [directory name] - change into the directory.
cd .. - change into the above directory.
clear - clears the screen or terminal.
logout - exits or closes the terminal connection.
Managing Files and Directories:
rm [filename] - deletes a file.
rmdir [directory name] - deletes a directory.
rm - rf [filename/directory] - deletes a file or directory including its sub directories.
cp [filename] [new filename] - copy a file.
cp -r [directory] [new directory] - copy a directory and its sub directories.
mv [filename/directory] [new filename/directory] - rename a file or directory.
mkdir [directory name] - creates a directory.
Modify and View Files:
less [filename] - opens a file for viewing page by page.
more [filename] - opens a file for viewing page by page.
cat [filename] - opens a file for viewing all at once.
tail -n [filename] - display the n number of lines from the bottom of the page.
head -n [filename] - display the n number of lines from the top of the page.
pico [filename] - opens a file for editing using the PICO editor.
vi [filename] - opens a file for editing using the VI editor.
Please note that there is many more parameters and triggers that can be applied with these commands. For more details regarding each command, refer to the manuals by typing “man [command]” in the shell.
|
Do you have an answer or something to share as well regarding this question?
|