Академический Документы
Профессиональный Документы
Культура Документы
The History
First UNIX
Solaris
Applications
Shells
Kernel
Hierarchical File system
Processes
What is UNIX
Core Kernel
Shell
Processes
Processes-based system
What is UNIX
Multi-user
Multi-process
StarOffice
PC Support
IPv6
Clustering Technology
Mirror partitions
Shells
Shell (CUI)
Shells Available
File system
File System
Main data persistence mechanism employed by Solaris.
Built on disk slices (or partitions) to store system and user data.
FileSystem
File System
fsck
Reasons
Operation
Users
Adding Users
1.Spawning a shell
2.Executing applications interactively
3.Scheduling applications to run on specific times
4.Accessing database applications and other services
login as root
#useradd [u uid] g gid d home_dir m [-s
path_shell]
[c comment] login_name
Example
Users
Modify password
Delete Users
#passwd username
#userdel [-r] oracle
-r Delete all relevant dir and record in system
#cat /etc/passwd
Groups
Delete group
#groupdel group_name
bash$ id
bash$ uid=101(omc) gid=102(omc)
#admintool
Files, Directories
ls -al
list all elements with full details
Example:
-rwxr-xr-x 1 oracle dba 10 2 19 11:03 root.sh.old
Bit1:
d the entry is a directory;
l the entry is a symbolic link;
-the entry is an ordinary file;
Bit2-4 permission for current user
Bit5-7 permission for users of current group except for current
user
Bit8-10 permission for users of other groups
Files, Directories
Modify Permissions
#chmod u+x lmfcfg.ini
#chmod g+x lmfcfg.ini
#chmod o+x lmfcfg.ini
#chmod oug-w lmfcfg.ini
Modify Permission (Octal file permissions)
#chmod 755 lmfcfg.ini
#chmod 551 lmfcfg.ini
Useful commands
chown
#chown omc file_name
#chown oracle file_name
chgrp
#chgrp dba file_name
df
display file system
#df k
Useful Commands
cd
changes the current working directory to a new directory
location. Both absolute and relative terms are available.
cd bin
cd /bin
cd ..
cd ../..
cd
Useful Commands
date
Prints the current system date and time.
#date
Cal
Prints the current calendar
#cal 4 2004 //print Apr 2004
#cal 2004
//print 2004
Useful Commands
grep
Searches a file for a string and prints the line wherever
a match is found
#grep string filename
Example:
bash-2.03$ grep MNo syscfg.ini
# Machine Number(MNo), its value should be
between 128 and 139.
MNo
= 129
Useful Commands
mkdir
Useful Commands
pwd
Prints the current working directory in absolute terms
#pwd
/export/home/omc/conf
Useful commands
compress/uncompress (.Z files)
compress/uncompress Z files
#uncompress file.Z
tar
add/extract files into/from archive files
#tar xvf archive.tar //extract
#tar cvf dir1 file1 file2 //add to archive file
su
change to another user
#su omc
Useful commands
Display the current user
#who am I
#id
#who
Useful commands
ps
The ps command prints information about active processes.
bash-2.03$ ps
PID TTY
TIME CMD
4676 pts/9 0:00 sh
4681 pts/9 0:00 bash
#ps ef|grep omc //Print all process with string omc
kill
kill processes
#kill -9 PID
Modify IP Address
Modify
/etc/hosts
/etc/defaultrouter
/etc/netmasks