You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
566 B
13 lines
566 B
2 years ago
|
# cli commands
|
||
|
#cli
|
||
|
|
||
|
## display list of content types and # of associated nodes:
|
||
|
drush sqlq 'select count(node.nid) as node_count, node_type.type from node inner join node_type on node.type = node_type.type group by node_type.type'
|
||
|
|
||
|
## And then if you want filter by a specific type, just use grep like this:
|
||
|
drush sqlq 'select count(node.nid) as node_count, node_type.type from node inner join node_type on node.type = node_type.type group by node_type.type' | grep 2014
|
||
|
|
||
|
## search replace in text mulitle files
|
||
|
perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.txt
|
||
|
|