#!/bin/bash FILE="" DIR="/tmp" # init # look for empty dir if [ "$(ls -A $DIR)" ]; then echo "Take action $DIR is not Empty" else echo "$DIR is Empty" fi # rest of the logic
Monthly Archives: February 2012
shell脚本检测一个目录是否为空
Posted by Tim
on February 26, 2012
No comments
linux chmod 命令实例
Posted by Tim
on February 18, 2012
No comments
linux copy 命令实例
Posted by Tim
on February 12, 2012
No comments
禁用危险的php函数
Posted by Tim
on February 5, 2012
2 comments
定位php.ini
root@server [~]# php -i | grep php.ini
在php.ini中找到
disable_functions =
这一行,在其后面添加需要禁止的危险函数名,以英文逗号分隔。
disable_functions = "apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all, ini_restore, inject_code, mysql_pconnect, openlog, passthru, php_uname, phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec, system, xmlrpc_entity_decode"
重启apache服务器
root@server [~]# service restart httpd
Recent Comments