Posts

Showing posts from November, 2018

Remove

I am currently trying to delete some files. The files I want to delete contain the number 3 or 2, either both or one of them. How do I delete files containing those numbers? The files are named like so: K-0_0_1_1_1_1_1_0.wav K-0_0_1_1_1_1_1_1.wav K-0_1_0_0_0_0_0_0.wav K-0_1_0_0_0_0_0_1.wav K-0_1_0_0_0_0_1_0.wav K-0_0_0_0_0_0_0_2.wav K-0_0_0_0_0_0_0_3.wav K-0_0_0_0_0_0_1_2.wav In this list the last three files should be deleted. For the current directory, you can use: rm -- *[23]* If you want to restrict it, to match only files where the 2 or 3 must occur between K and .wav: rm K*[23]*.wav If you want to make this safer by forcing rm to ask for confirmation for every file, use the -i interactive flag: rm -i K*[23]*.wav Notes the shell glob * matches any number (including zero) of any characters to the shell [some chars] is a character class - anything inside can match -- is recognised by rm as the end of options. This avoids errors if any filenames begin ...

linux

In this chapter, we will discuss in detail about file management in Unix. All data in Unix is organized into files. All files are organized into directories. These directories are organized into a tree-like structure called the filesystem. When you work with Unix, one way or another, you spend most of your time working with files. This tutorial will help you understand how to create and remove files, copy and rename them, create links to them, etc. In Unix, there are three basic types of files − Ordinary Files − An ordinary file is a file on the system that contains data, text, or program instructions. In this tutorial, you look at working with ordinary files. Directories − Directories store both special and ordinary files. For users familiar with Windows or Mac OS, Unix directories are equivalent to folders. Special Files − Some special files provide access to hardware such as hard drives, CD-ROM drives, modems, and Ethernet adapters. Other special files are similar to alia...

Bsu

Image
This Demo Shows How To Apply/Install Patch Using BSU Utility Command Line ==> The purpose of applying patch to BEA_HOME OR WLS_HOME Is To Fix Bugs. ==> BSU Utility is shipped with weblogic product  ==> Oracle Releases PSU(Patch Set Update) OR CPU(Critical Patch Update) Patches Quarterly (January - April - July - October), As PSU patches Are Cumulative and all bug fixes are available hence it is highly recommended to apply psu quarterly    Summary Download The PSU From Oracle Support Create Directory cache_dir inside $ MW_HOME/utils/bsu Copy The Downloaded Patch To $MW_HOME/utils/bsu/cache_ dir Using WinScp Unzip The Copied Zip Patch File Set The Environment Using setWLSEnv.sh  Run The Patch Install Command Using bsu.sh Verify Whether Patch Applied To The BEA_HOME 1. Download The PSU From Oracle Support Login To My Oracle Support  http://support.oracle. com Click on "Pa...

bin-apache

-rw-r--r--. 1 sv-wl10 sv-wl10  14867 Sep 13 12:53 catalina.bat -rwxr-xr-x. 1 sv-wl10 sv-wl10  22556 Sep 13 12:53 catalina.sh -rwxr-xr-x. 1 sv-wl10 sv-wl10  22556 Nov  9 23:08 catalina.sh_10112018Balu -rw-r--r--. 1 sv-wl10 sv-wl10   1647 Sep 13 12:53 catalina-tasks.xml -rw-r--r--. 1 sv-wl10 sv-wl10  25145 Sep 13 12:53 commons-daemon.jar -rw-r--r--. 1 sv-wl10 sv-wl10 207125 Sep 13 12:53 commons-daemon-native.tar.gz -rw-r--r--. 1 sv-wl10 sv-wl10   2040 Sep 13 12:53 configtest.bat -rwxr-xr-x. 1 sv-wl10 sv-wl10   1922 Sep 13 12:53 configtest.sh -rwxr-xr-x. 1 sv-wl10 sv-wl10   8508 Sep 13 12:53 daemon.sh -rw-r--r--. 1 sv-wl10 sv-wl10   2091 Sep 13 12:53 digest.bat -rwxr-xr-x. 1 sv-wl10 sv-wl10   1965 Sep 13 12:53 digest.sh -rw-r--r--. 1 sv-wl10 sv-wl10   3460 Sep 13 12:53 setclasspath.bat -rwxr-xr-x. 1 sv-wl10 sv-wl10   3680 Sep 13 12:53 setclasspath.sh -rw-r--r--. 1 sv-wl10 ...

context.xml

context.xml with in the conf folder [sv-wl10@inddlvtwlmas01 conf]$ more context.xml In the context.xml file we can have data sources that is where the data is getting for the client applications deployment . NOTE: <! --   comments -->    this is to comment the text notation with in the xml  file.  the below is the file by default <?xml version='1.0' encoding='utf-8'?> <!--   Licensed to the Apache Software Foundation (ASF) under one or more   contributor license agreements.  See the NOTICE file distributed with   this work for additional information regarding copyright ownership.   The ASF licenses this file to You under the Apache License, Version 2.0   (the "License"); you may not use this file except in compliance with   the License.  You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law o...

Server.xml

server.xml with in the conf directory more server.xml  <? xml version='1.0' encoding='utf-8' ?> <!--   Licensed to the Apache Software Foundation (ASF) under one or more   contributor license agreements.  See the NOTICE file distributed with   this work for additional information regarding copyright ownership.   The ASF licenses this file to You under the Apache License, Version 2.0   (the "License"); you may not use this file except in compliance with   the License.  You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License. --> ...

start

[sv-wl10@inddlvtwlmas01 Desktop]$ su - Password: [root@inddlvtwlmas01 ~]# mkdir var [root@inddlvtwlmas01 ~]# ll total 64 -rw-------. 1 root root  2727 Nov  4 11:46 anaconda-ks.cfg -rw-r--r--. 1 root root 40438 Nov  4 11:46 install.log -rw-r--r--. 1 root root  9040 Nov  4 11:43 install.log.syslog drwxr-xr-x. 2 root root  4096 Nov 11 10:20 var [root@inddlvtwlmas01 ~]# rm var rm: cannot remove `var': Is a directory [root@inddlvtwlmas01 ~]# rm -rf var [root@inddlvtwlmas01 ~]# ll total 60 -rw-------. 1 root root  2727 Nov  4 11:46 anaconda-ks.cfg -rw-r--r--. 1 root root 40438 Nov  4 11:46 install.log -rw-r--r--. 1 root root  9040 Nov  4 11:43 install.log.syslog [root@inddlvtwlmas01 ~]# cd / [root@inddlvtwlmas01 /]# mkdir var mkdir: cannot create directory `var': File exists [root@inddlvtwlmas01 /]# ll total 94 drwxr-xr-x.   8 sv-wl10 sv-wl10  4096 Nov  8 21:40 apps dr-xr-xr-x.   2 roo...

ping

[root@inddlvtwlmas02 ~]# ping -n www.google.com PING www.google.com (172.217.163.36) 56(84) bytes of data. 64 bytes from 172.217.163.36: icmp_seq=1 ttl=128 time=70.3 ms 64 bytes from 172.217.163.36: icmp_seq=3 ttl=128 time=29.0 ms 64 bytes from 172.217.163.36: icmp_seq=4 ttl=128 time=22.8 ms 64 bytes from 172.217.163.36: icmp_seq=5 ttl=128 time=247 ms 64 bytes from 172.217.163.36: icmp_seq=6 ttl=128 time=16.6 ms 64 bytes from 172.217.163.36: icmp_seq=7 ttl=128 time=21.9 ms 64 bytes from 172.217.163.36: icmp_seq=8 ttl=128 time=17.2 ms 64 bytes from 172.217.163.36: icmp_seq=9 ttl=128 time=15.6 ms 64 bytes from 172.217.163.36: icmp_seq=10 ttl=128 time=14.7 ms 64 bytes from 172.217.163.36: icmp_seq=11 ttl=128 time=18.6 ms 64 bytes from 172.217.163.36: icmp_seq=12 ttl=128 time=24.8 ms 64 bytes from 172.217.163.36: icmp_seq=13 ttl=128 time=13.9 ms 64 bytes from 172.217.163.36: icmp_seq=14 ttl=128 time=242 ms 64 bytes from 172.217.163.36: icmp_seq=15 ttl=128 time=13.0 ms 64 b...

pack

./pack.sh -domain=/apps/oracle/weblogic10.3.6/user_projects/domains/balu_domain/ -template=/apps/domainpacks/balu_domain.jar -template_name=remote_managed -managed=true << read domain from "/apps/oracle/weblogic10.3.6/user_projects/domains/balu_domain" >>  succeed: read domain from "/apps/oracle/weblogic10.3.6/user_projects/domains/balu_domain" << set config option Managed to "true" >>  succeed: set config option Managed to "true" << write template to "/apps/domainpacks/balu_domain.jar" .................................................................................................... >>  succeed: write template to "/apps/domainpacks/balu_domain.jar" << close template >>  succeed: close template  ./unpack.sh -domain=/apps/oracle/weblogic10.3.6/user_projects/domains/balu_domain -template=/home/sv-wl10/Desktop/balu_domain.jar  << read template from "/...

scp

Linux certificates trasformation To send the certs from 1st machine to 2nd machine do the below. pwd /apps/apache/certs The above path is the location of certificates on the 1st server (inddlvtwlmas01.srisohan.net). scp -rp <Key file> sv-wl10@inddlvtwlmas02.srisohan.net:/apps/apache/certs/ scp -rp <Crt file> sv-wl10@inddlvtwlmas02.srisohan.net:/apps/apache/certs/ To copy any file from 01 server (/home/sv-wl10/script.sh) to 2nd server home path (/home/sv-wl10) pwd /home/sv-wl10 scp script.sh sv-wl10@inddlvtwlmas02.srisohan.net:/home/sv-wl10/ After executing the above scp command if it asks for a password , you have to enter the password. Which password to enter ? the service account password which we mentioned before the second server (sv-wl10). ================================= When we logged in 2nd server and we need to copy a file from the 1st server to 2nd  server, do the following [sv-wl10@inddlvtwlmas02 sv-wl10]$ pwd scp sv-wl10@in...

keys

create keys and certificates for apachee [sv-wl10@inddlvtwlmas01 ~]$ openssl req -new -newkey rsa:2048 -nodes -keyout inddlvtwlmas01.srisohan.net.key -out inddlvtwlmas01.srisohan.net.csr Generating a 2048 bit RSA private key ...........................................+++ ...........................................+++ writing new private key to 'inddlvtwlmas01.srisohan.net.key' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:IN State or Province Name (full name) []:KARNATAKA Locality Name (eg, city) [Default City]:Bangalore                  Organization Name (eg, company) [Default Company Ltd]:srisoha...

chmod

About chmod chmod is used to change the permissions of files or directories. Overview On Linux and other Unix-like operating systems, there is a set of rules for each file which defines who can access that file, and how they can access it. These rules are called file permissions or file modes. The command name chmod stands for "change mode", and it is used to define the way a file can be accessed. Before continuing, you should read the section What Are File Permissions, And How Do They Work? in our documentation of the umask command. It contains a comprehensive description of how to define and express file permissions. In general, chmod commands take the form: chmod options permissions file name If no options are specified, chmod modifies the permissions of the file specified by file name to the permissions specified by permissions. permissions defines the permissions for the owner of the file (the "user"), members of the group who owns the fi...

weblogic

Weblogic Installation from network hostname " vi /etc/hosts --> You can define an IP address to a DNS Name (Server Name). You have to make changes only with "root" permissions. Also, you should mention your server name in the /etc/sysconfig/network file. vi /etc/sysconfig/network HOSTNAME=inddlvtwlmas01.srisohan.net Note: If there is an existing name, you should comment that line. IMP NOTE: After changing the hostname, you should either reboot your VM or need to restart the network service to take the changes effected. Command to restart N/W Service (We must be executing this with "root"): service network restart Wait for the execution and then logout from that session and then open a new terminal to check the hostname.s Eg: # HOSTNAME=localhost.localdomain Execute this below command to check the server name: hostname or hostname -f or hostname -a server name can be a FQDN (Fully Qualified Domain Name): Eg: inddlvtwlmas01.srisohan...