Solution:
find -name "*" | xargs grep -il "LuckYacademY"
ifconfig eth0 inet6 del fd00:7a06:a248:1:250:56ff:fe86:32cb/64
[root@dragon bin]# ls -l | wc -l 25 [root@dragon bin]#
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.tar.gz"
[root@dragon ~]# netstat -tulpn | grep 8080
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 14491/./haproxy-1.4
[root@dragon ~]# ps -aef | grep 14491
80 14491 1 0 Oct24 ? 00:00:04 ./haproxy-1.4.24-pcre-40kses-linux-i586.stripped -f /etc/haproxy/haproxy.cfg
find -name "*.jar" | xargs grep -l "DataSource"The above command searches for DataSource class in all jar files located in current working directory
#cd /opt/webservers/tomcat/bin //Execute below script #export JPDA_ADDRESS=8000 #export JPDA_TRANSPORT=dt_socket #export JPDA_SUSPEND=n #./catalina.sh jpda start
RequestHeader edit Cookie "SESSION" "LUCKY.SESSION"Hint: Please include headers module to work. For ex: Uncomment "LoadModule headers_module modules/mod_headers.so" in httpd.conf
package com; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; /** * It reads data from a site by sending cookie and custom http header * @author lucky academy * */ public class URLReaderDemo { public static void main(String[] args)throws Exception { //URL of the site URL site = new URL("http://www.luckyacademy.com/services/odata/Person"); //Open Connection URLConnection uc = site.openConnection(); //Set Cookie uc.setRequestProperty("Cookie", "JSESSIONID=F2845FC15FCF6660EB093D00DAE73BB2; rememberMe=false"); //Set custom http header uc.setRequestProperty("tenantId","ebay"); //read data from the site //Setting http headers after opening input stream will not have any effect BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); } }
find . -type f -print | xargs sed -i 's/abc/123/g'
[root@mydesktop build]# echo $PS1 [\u@\h \W]\$To change value:
[root@mydesktop build]#export PS1='[\u@dragon \W]\$' [root@dragon build]#
[root@dragon ~]#cat .bashrc # .bashrc # User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi export PS1='[\u@dragon \W]\$'
[root@dragon ~]# mysqladmin -u root password root