Click here to return to Newclient Main Help Page

Rule the World with 13 UNIX Commands

You shouldn't concern yourself about needing to be a UNIX guru to administrate your Virtual Server, you simply need a basic knowlege of a few easy to use UNIX commands. This list is by no means comprehensive, but it should be enough to get you started. If you would like to know more about a command, consult the on line manual pages by typing:
  man command
You may be interested in the remote management utilities that BWSD as provided, iManager and iRoot. These scripts are easily installed on your server and can then be accessed using your favorite browser client software.

If you need further assistance with a command listed below, or if you have a question about UNIX in general, don't hesistate to contact our Technical Support Staff.


Command List

cd | pwd | ls | mkdir | rmdir | cp | mv | rm | grep | tar | zip | unzip | compress

 

  1. Command: cd

    Usage: The cd command changes your current working directory.

  2. Command: pwd

    Usage: The pwd command tells you what the current working directory you are in on your Virtual Server.

    Example: Simply type "pwd" at a telnet command prompt and it will return something like "/usr/home/bwsd/etc"

  3. Command: ls

    Usage: The ls command lists the files and subdirectories of the current directory you are in. You can also add some arguments to the ls command to make it more meaningful.

    If you type "ls -F" it will append a forward slash to the subdirectory names so you can easily distinguish them from file names.

    If you type "ls -a" it will show all hidden files such as .htaccess files.

    If you type "ls -l" it will show detailed information about each file and directory, including permissions, owners, size, and when the file was last modified.

    Example: Type "ls -al" at a telnet command prompt and it will return your file names including hidden files, and a forward slash will be inserted in front of subdirectories.

    DOS Equivalent: dir

  4. Command: mkdir

    Usage: The mkdir command makes a new directory. Simply type "mkdir directory" at a telnet command prompt and replace directory with the name of the directory you want to create.

    Example: Type "mkdir temp" at a telnet command prompt to create a new directory called temp.

    DOS Equivalent: md, mkdir

  5. Command: rmdir

    Usage: The rmdir command deletes (removes) a directory. Simply type "rmdir directory" at a telnet command prompt and replace directory with the name of the directory you want to delete.

    Example: Type "rmdir temp" at a telnet command prompt to remove a directory called temp.

    DOS Equivalent: rd, rmdir

  6. Command: cp

    Usage: The cp command copies a file to a new location or filename. Simply type "cp filename copyname" at a telnet command prompt and replace filename with the name of the file you want to copy, and copyname with the name of the new copy.

    You can also add a directory structure if you want to copy the file to a completely new location. Simply type "cp filename directory/copyname" and replace directory with the name of the directory in which you want the new copy placed.

    Example: Type "cp home.htm index.html" at a telnet command prompt to copy a file called home.htm to a file called index.html

    DOS Equivalent: copy

  7. Command: mv

    Usage: The mv command renames a file or moves it to a new location. Simply type "mv oldfile newfile" at a telnet command prompt and replace oldfile with the name of the file you want to rename or move, and newfile with the new name of the new file.

    You can also add a directory structure if you want to move the file to a completely new location. Simply type "mv oldfile directory/newfile" and replace directory with the name of the directory in which you want the file moved.

    Example: Type "mv test.conf test.old.conf" at a telnet command prompt to move a file called test.conf to a file called test.old.conf

    DOS Equivalent: move, rename

  8. Command: rm

    Usage: The rm command deletes (removes) a file. Simply type "rm filename" at a telnet command prompt and replace filename with the name of the file you want to delete.

    Example: Type "rm test.html" at a telnet command prompt to remove a file called test.html.

    DOS Equivalent: del

  9. Command: grep

    Usage: The grep command finds lines in files that match specified text patterns. Simply type "grep "text" filenames" at a telnet command prompt and replace "text" with the word or phrase you want to search for, and replace filenames with the files you want to search in. To search all files in the current directory, simply replace ilenames with * .

    Example: Type "grep "for sale" *" at a telnet command prompt to find any files in the current directory that contain the text "for sale" in them.

  10. Command: tar

    Usage: The tar command copies a file or files to or from an archive. To put all the files in a directory into one tar format file, simply type "tar cvf tarfile directory" at a telnet command prompt and replace tarfile with the name you want to call your archived file, and replace directory with the name of the directory that contains the files you want to tar.

    To extract the files fram a tar format archive, simply type "tar xvf tarfile at a telnet command prompt and replace tarfile with the name of the archived file you are extracting.

    Example: Type "tar cvf pages.tar htdocs" at a telnet command prompt to archive the files in the htdocs directory to a tar format file called pages.tar.

    You could also type "tar xvf pages.tar" at a telnet command prompt to extract into the current directory the files in the archive pages.tar.

  11. Command: zip

    Usage: The zip command compresses a file or list of files into a zip format archive file. This command is compatable with pkzip on a PC. Simply type "zip zipfile file1 file2 file3" at a telnet command prompt and replace zipfile with the name you want to use for your compressed zip archive file, and replace fileX with the name of the file(s) you want to compress into the zip archive.

    Example: Type "zip back.zip home.html index.html" at a telnet command prompt to compress and archive the files called home.html and index.html into the file called back.zip.

    DOS Equivalent: pkzip

  12. Command: unzip

    Usage: The unzip command extracts a zip format archive file. This command is compatible with pkunzip files from a PC. Simply type "unzip zipfile" at a telnet command prompt and replace zipfile with the name of your zip format archive file.

    Example: Type "unzip -aL old.zip" at a telnet command prompt to extract the archive called old.zip. The "-aL" are options that are generally useful when unzipping files created on a PC.

    DOS Equivalent: pkunzip

  13. Command: compress

    Usage: The compress command shrinks a file or files into compressed versions to save space on your Virtual Server. This command is good for you to use on your log files when they get very large. Simply type "compress filename(s)" at a telnet command prompt and replace filename(s) with the name of your files you want to compress.

    Example: Type "compress access_log agent_log" at a telnet command prompt to compress the access_log and agent_log files. The compressed files will then be access_log.Z and agent_log.Z

bd