Rename files in directory
for i in * ; do mv "$i" "`echo $i | sed 's/old/new/g'`"; done
Archive for July, 2011
for i in * ; do mv "$i" "`echo $i | sed 's/old/new/g'`"; done
Taken from these instructions on how to setup the site to site VPN: https://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a0080950890.shtml#asa5510
All you need to do is remove the tunnel-group line
tunnel-group 172.16.1.1 type ipsec-l2l
Save changes to config:
wr mem
There is a limitation with the EX4200 where you can only create one span port analyzer. You can either monitor VLAN ingress or port ingress and egress. In addition, you can only have one destination port for the span port traffic
First make sure there in no VLAN associated with the destination port.
To create the span port analyzer for VLAN 20:
set ethernet-switching-options analyzer MIRROR input ingress vlan 20
To create the destination port on interface ge-0/0/4
set ethernet-switching-options analyzer MIRROR output interface ge-0/0/4
Save the changes:
commit synchronize
Lots of this was taken from here: http://www.pantz.org/software/mysql/mysqlcommands.html
Figured since I referenced it so much …
mysql> show slave status;
mysql> show processlist; (show full proccesslist;)
mysql> show variables like ‘%collation%’;
# [mysql dir]/bin/mysql -h hostname -u root -p
mysql> create database [databasename];
Create a database on the sql server setting to UTF8
mysql> CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> show databases;
mysql> use [db name];
mysql> show tables;
mysql> describe [table name];
mysql> drop database [database name];
mysql> drop table [table name];
mysql> SELECT * FROM [table name];
mysql> show columns from [table name];
mysql> SELECT * FROM [table name] WHERE [field name] = “whatever”;
mysql> SELECT * FROM [table name] WHERE name = “Bob” AND phone_number = ’3444444′;
mysql> SELECT * FROM [table name] WHERE name != “Bob” AND phone_number = ’3444444′ order by phone_number;
mysql> SELECT * FROM [table name] WHERE name like “Bob%” AND phone_number = ’3444444′;
mysql> SELECT * FROM [table name] WHERE name like “Bob%” AND phone_number = ’3444444′ limit 1,5;
mysql> SELECT * FROM [table name] WHERE rec RLIKE “^a”;
mysql> SELECT DISTINCT [column name] FROM [table name];
mysql> SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;
mysql> SELECT COUNT(*) FROM [table name];
mysql> SELECT SUM(*) FROM [table name];
mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;
# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,User,Password) VALUES(‘%’,'username’,PASSWORD(‘password’));
mysql> flush privileges;
# [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password ‘new-password’
# mysql -u root -p
mysql> SET PASSWORD FOR ‘user’@'hostname’ = PASSWORD(‘passwordhere’);
mysql> flush privileges;
# /etc/init.d/mysql stop
# mysqld_safe –skip-grant-tables &
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD(“newrootpassword”) where User=’root’;
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start
# mysqladmin -u root password newpassword
# mysqladmin -u root -p oldpassword newpassword
# mysql -u root -p
mysql> use mysql;
mysql> grant usage on *.* to bob@localhost identified by ‘passwd’;
mysql> flush privileges;
# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES (‘%’,'databasename’,'username’,'Y’,'Y’,'Y’,'Y’,'Y’,'N’);
mysql> flush privileges;
or
mysql> grant all privileges on databasename.* to username@localhost;
mysql> flush privileges;
mysql> UPDATE [table name] SET Select_priv = ‘Y’,Insert_priv = ‘Y’,Update_priv = ‘Y’ where [field name] = ‘user’;
mysql> DELETE from [table name] where [field name] = ‘whatever’;
mysql> flush privileges;
mysql> alter table [table name] drop column [column name];
mysql> alter table [table name] add column [new column name] varchar (20);
mysql> alter table [table name] change [old column name] [new column name] varchar (50);
mysql> alter table [table name] add unique ([column name]);
mysql> alter table [table name] modify [column name] VARCHAR(3);
mysql> alter table [table name] drop index [colmn name];
mysql> LOAD DATA INFILE ‘/tmp/filename.csv’ replace INTO TABLE [table name] FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\n’ (field1,field2,field3);
# [mysql dir]/bin/mysqldump -u root -ppassword –opt >/tmp/alldatabases.sql
# [mysql dir]/bin/mysqldump -u username -ppassword –databases databasename >/tmp/databasename.sql
# [mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql
# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql
mysqldump -u root -p –routines –no-create-info –no-data –no-create-db –skip-opt database_name > file_name.sql