[sean@station62 tmp]$ cd report
[sean@station62 report]$ cp /etc/passwd 1.txt
[sean@station62 report]$ cp /etc/passwd 2.txt
[sean@station62 report]$ cp /etc/passwd 3.txt
[sean@station62 report]$ ls
1.txt 2.txt 3.txt
[sean@station62 report]$ cd ..
[sean@station62 tmp]$ ls
report
[sean@station62 tmp]$ rsync -av report/ report2
sending incremental file list
created directory report2
./
1.txt
2.txt
3.txt
sent 6058 bytes received 72 bytes 12260.00 bytes/sec
total size is 5841 speedup is 0.95
sean 發表在 痞客邦 留言(0) 人氣(22)
[sean@station62 tmp]$ rename .htm .html *
[sean@station62 tmp]$ ls
file1.html file3.html file5.html file7.html file9.html
file2.html file4.html file6.html file8.html
sean 發表在 痞客邦 留言(0) 人氣(21)
mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
解決方法
[root@127 html]# /etc/init.d/mysqld stop
正在停止 mysqld: [ 確定 ]
[root@127 html]# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
[1] 3875
[root@127 html]# 120810 21:37:39 mysqld_safe Logging to '/var/log/mysqld.log'.
120810 21:37:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> UPDATE user SET Password=PASSWORD('******') where USER='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
[root@127 html]# /etc/init.d/mysqld restart
120810 21:39:39 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
正在停止 mysqld: [ 確定 ]
正在啟動 mysqld: [ 確定 ]
[1]+ Done mysqld_safe --user=mysql --skip-grant-tables --skip-networking
[root@127 html]# mysql -uroot -p
Enter password: 輸入剛剛輸入的新密碼 ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
sean 發表在 痞客邦 留言(0) 人氣(70)
[sean@station62 桌面]$ ssh -X peter@192.168.123.52
Last login: Thu Aug 9 10:09:28 2012 from 192.168.123.62
/usr/bin/xauth: creating new authority file /home/peter/.Xauthority
[peter@localhost ~]$ firefox
sean 發表在 痞客邦 留言(0) 人氣(22)