MPS - Rule the World with 11 Solaris UNIX Commands |
|
Summary |
![]() |
You shouldn't concern yourself with becoming a Solaris UNIX guru to manage your MPS, you simply need a basic knowledge of a few easy-to-use UNIX commands. |
Keywords |
![]() |
solaris, commands, administration, telnet, unix, command |
Description |
![]() |
Rule the World with 11 Solaris UNIX Commands
You shouldn't concern yourself with becoming a Solaris UNIX guru to manage your MPS, you simply need a basic knowledge of a few easy-to-use UNIX commands. This list is by no means comprehensive, but it should be enough to get you started.
cd | pwd | ls | cat | mkdir | rmdir | cp | mv | rm | grep | tar | | compress | uncompress | |
---|---|
cd | [directory]
DOS Equivalent: cd |
pwd | The pwd command prints your current (or present) working directory.
Usage: Simply type "pwd" and hit return to display your current working directory. |
ls | [directory]
Usage: The ls command will display all files in the current working directory - simply type "ls" and hit return. You can also add some additional arguments to customize the list display.
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". Hidden files begin with a ".", i.e. ".htaccess" files.
If you type "ls -l" it will show detailed information about each file and directory, including permissions, ownership, file size, and when the file was last modified.
You can mix the arguments, i.e. if you type "ls -aF" you will see a list of all file names (including hidden files and a forward slash will be appended to directory names.
DOS Equivalent: dir |
cat | [filename]
DOS Equivalent: type |
mkdir | [directory]
DOS Equivalent: md or mkdir |
rmdir | [directory]
DOS Equivalent: rd or rmdir |
cp | [source-file] [target-file]
DOS Equivalent: copy |
mv | [source-file] [target-file]
DOS Equivalent: rename |
rm | [filename]
DOS Equivalent: del |
grep | [pattern] [filenames]
DOS Equivalent: find |
tar | [options] [tarfile] [files]
To extract the files from 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.
For example, you could 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.
To view the contents of the pages.tar tarfile without extracting them, type "tar tvf pages.tar". This will display all files that are included in the tar archive.
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. |
compress | [files]
The compress command shrinks a file or files into compressed versions to save space on your MPS. 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.
For 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. |
uncompress | [files] The uncompress command expands a compressed file or set of compressed files. Simply type "uncompress filename(s)" and hit return. |