Remove software
list software packages

$ rpm -qa|grep example

force remove

$ rpm -e --nodeps example

Hide and Prevent a folder and Directory Listing of Your Website
hide your folder and do not want directory files to show in browser

  • add a empty and no content “index.html” file in your folder or directory

  • add “Options -Indexes” to your .htaccess in your website directory .

  • change “Options Indexes FollowSymLinks” to “Options FollowSymLinks” in your httpd.conf file and restart apache.

Magento Log Cleaning

“System”->”Configuration”->”ADVANCED”->”System”->”Log Cleaning”

Repair mysql table crashed error

"mysqldump -uroot -p your_mysql_name"

your will get error: table_name’ is marked as crashed and should be repaired when using LOCK TABLES
and then you can fix it

mysql> use your_mysql_name;
mysql> repair table your_error_table_in_this_mysql;

use tar&openssl to encrypt your files

Encrypt: tar -zcvf - iCloud|openssl des3 -salt -k your-password | dd of=iCloud.des3 (The first “iCloud” is your file name, please change your-password to your password)
Decrypt: dd if=iCloud.des3 |openssl des3 -d -k your-password|tar zxf - (do not forgot the “-“).

use ley to login your remote linux server with key

ssh -i your-key-file-path [email protected]

copy remote file to your machine

scp -i your-key-file-path [email protected]:/file-path /server-path


find path_or_file |wc -l


ls | head -number |xargs -I {} mv {}  new_file_path

ls |head -10000 |xargs -I {} mv {} /var/www/html/new

删除文件夹下大量文件,当使用rm -rf提示错误的时候

ls |xargs -n 100 rm -rf ls



$echo 3 > /proc/sys/vm/drop_caches


find your_files_path -name "*.*" |xargs grep "search_content"

Leave A Comment

Your email address will not be published. Required fields are marked *