1.Remove files
2.Find files
3.View files
4.Performance
5.Network Commands
6.Change Owner
7.Tar commands
8.Unix Function to restart WAS
rm -f *.log will remove all files ending with .log
rm -rf * will be used to delete directories
find . -type f -name *.log is used to find files
find . -type d -name server1 is used to search for directories
cat test.txt
sar-system activity recorder
vmstat-virtual memory statistics
iostat-input output statistics
pstat-paging size statistics
ifconfig -a -To know status of ethernet
chown ora11gr2 system.log - Change the ownership of file named system.log to ora11gr2>
tar -cvf mytar.tar * -This will create a tar named mytar.tar with all directories and files included in current directory
c-create
x-extract
v-verbose
f-file name
tar -xvf mytar.tar -This will extract the tar
If you want to extract a tar in different path then use the below command in the path where you want it to be extracted
tar -xvf /tmp/mytar.tar
tar -tvf mytar.tar -This is used to view the content of a tar without extracting.
If you want to add some extra files or directories use the below command
tar -rvf mytar.tar extra.Here extra is a directory or file
function restart()
{
cd $was_profile/bin
./stopServer.sh server1
sleep 5
./startServer.sh server1
}
Add these lines to .profile of users home directory.
Execute the .profile using the command like . ./.profile
Then whenever you type restart anywhere in the unix server WAS will be restarted
You can add dmgr stop and start service also in the function so that each time no need to navigate to the path and issue the command
2.Find files
3.View files
4.Performance
5.Network Commands
6.Change Owner
7.Tar commands
8.Unix Function to restart WAS
Remove files
rm -f *.log will remove all files ending with .log
rm -rf * will be used to delete directories
Finding files
find . -type f -name *.log is used to find files
find . -type d -name server1 is used to search for directories
Viewing files
cat test.txt
Performance in AIX
sar-system activity recorder
vmstat-virtual memory statistics
iostat-input output statistics
pstat-paging size statistics
Network Commands
ifconfig -a -To know status of ethernet
Change owner of a file
chown ora11gr2 system.log - Change the ownership of file named system.log to ora11gr2>
Used to reduce the size
tar -cvf mytar.tar * -This will create a tar named mytar.tar with all directories and files included in current directory
c-create
x-extract
v-verbose
f-file name
tar -xvf mytar.tar -This will extract the tar
If you want to extract a tar in different path then use the below command in the path where you want it to be extracted
tar -xvf /tmp/mytar.tar
tar -tvf mytar.tar -This is used to view the content of a tar without extracting.
If you want to add some extra files or directories use the below command
tar -rvf mytar.tar extra.Here extra is a directory or file
Function to start and stop the server
function restart()
{
cd $was_profile/bin
./stopServer.sh server1
sleep 5
./startServer.sh server1
}
Add these lines to .profile of users home directory.
Execute the .profile using the command like . ./.profile
Then whenever you type restart anywhere in the unix server WAS will be restarted
You can add dmgr stop and start service also in the function so that each time no need to navigate to the path and issue the command
No comments:
Post a Comment
Your suggestions please