Drush is a command line to manage Drupal. These are some usage example.
01 | # create a list of enab威而鋼
|
02 | led modules
|
03 | drush sm --pipe --status=enabled
|
04 | |
05 |
|
06 | # create txt file which contains a list of enabled modules
|
07 | |
08 | |
09 | drush sm --pipe --status=enabled | cat > modules_enabled.txt
|
10 |
|
11 |
|
12 | |
Simple command to find out what shell you are using.
# --- SVN ----
This way you can get stats from your logs but this method is a little bit rudimentary as you are going to get visits from crawlers, bots,… that are not real visits. Parse your logs directly with awk.
# Remove all .svn folders in a directory tree
2 | |
3 | find . -name ".svn" -type d -exec rm -rf {} ;
|
4 |
1 | ps -ef | grep $$ | awk '{print $8}' | 5 | | 6 |
How to make a regexp search with find recursively . If you want to search only in php files, replace file_pattern with “*.php”
echo 'Number of unique visitors'
|
If you want to know what files a rpm package copied to your system, you can find it out executing the following command:
cat /var/log/apache/www.yoursite.com-access.log |awk '{print $1}' | sort | uniq | wc -l
|
How to change the owner/group of a file or directory recursively.
To change the group:
echo 'Ip of unique visitors'