System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| # get total requests by status code | |
| awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | |
| # get top requesters by IP | |
| awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}' | |
| # get top requesters by user agent | |
| awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | |
| # get top requests by URL |
| Run this | |
| "sudo -u postgres psql" | |
| in your terminal to get into postgres | |
| postgres=# | |
| Run "CREATE USER new_username;" | |
| Note: Replace new_username with the user you want to create, |
| var libxmljs = require("libxmljs"); | |
| var xml = [ | |
| '<?xml version="1.0" encoding="utf-8"?>', | |
| '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">', | |
| ' <soap:Body>', | |
| ' <Response xmlns="http://tempuri.org/">', | |
| ' <Result>', | |
| ' <client xmlns="">', | |
| ' <msg>SEARCH OK.</msg>', | |
| ' <code>0</code>', |
System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories