SELECT
nspname AS schemaname,relname,reltuples::integer
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE
nspname NOT IN ('pg_catalog', 'information_schema') AND
relkind='r'
ORDER BY reltuples DESC;
Archivos .tar.gz:
Comprimir: tar -czvf empaquetado.tar.gz /carpeta/a/empaquetar/
Descomprimir: tar -xzvf archivo.tar.gz
Archivos .tar:
Empaquetar: tar -cvf paquete.tar /dir/a/comprimir/
Desempaquetar: tar -xvf paquete.tar
Archivos .gz:
Comprimir: gzip -9 index.php
Descomprimir: gzip -d index.php.gz
Archivos .zip:
Comprimir: zip archivo.zip carpeta
Descomprimir: unzip archivo.zip
mysql> SELECT table_name AS "tabla", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Tamaño (MB)" FROM information_schema.TABLES WHERE table_schema = "ebdb" ORDER BY (data_length + index_length) DESC; +--------------------------+--------------+ | tabla | Tamaño (MB) | +--------------------------+--------------+ | wp_postmeta | 2172.67 | | wp_options | 990.19 | | wp_posts | 573.66 | | wp_cf_form_entry_values | 124.20 | | wp_redirection_404 | 48.69 | | wp_cf_form_entries | 18.58 | | wp_ine_activity_log | 13.52 | | wp_redirection_logs | 3.33 | | wp_usermeta | 0.55 | | wp_term_relationships | 0.22 | | wp_redirection_items | 0.09 | | wp_terms | 0.09 | | wp_term_taxonomy | 0.09 | | wp_comments | 0.09 | | wp_users | 0.06 | | wp_cf_tracking_meta | 0.05 | | wp_redirection_groups | 0.05 | | wp_cf_form_entry_meta | 0.05 | | wp_termmeta | 0.05 | | wp_commentmeta | 0.05 | | wp_download_log | 0.03 | | wp_dlm_order_transaction | 0.03 | | wp_dlm_order_item | 0.03 | | wp_links | 0.03 | | wp_dlm_order_customer | 0.03 | | wp_cf_tracking | 0.02 | | wp_ine_activity_conf_log | 0.02 | | wp_dlm_session | 0.02 | | wp_dlm_order | 0.02 | | wp_responsive_menu | 0.02 | +--------------------------+--------------+ 30 rows in set (0.00 sec)
mysql> SELECT table_name as tablas, table_rows as registros FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'ebdb'; +--------------------------+-----------+ | tablas | registros | +--------------------------+-----------+ | wp_cf_form_entries | 133859 | | wp_cf_form_entry_meta | 0 | | wp_cf_form_entry_values | 801966 | | wp_cf_tracking | 0 | | wp_cf_tracking_meta | 0 | | wp_commentmeta | 0 | | wp_comments | 0 | | wp_dlm_order | 0 | | wp_dlm_order_customer | 0 | | wp_dlm_order_item | 0 | | wp_dlm_order_transaction | 0 | | wp_dlm_session | 0 | | wp_download_log | 27 | | wp_ine_activity_conf_log | 0 | | wp_ine_activity_log | 103685 | | wp_links | 0 | | wp_options | 110724 | | wp_postmeta | 280516 | | wp_posts | 59708 | | wp_redirection_404 | 114932 | | wp_redirection_groups | 2 | | wp_redirection_items | 68 | | wp_redirection_logs | 6851 | | wp_responsive_menu | 279 | | wp_term_relationships | 2271 | | wp_term_taxonomy | 396 | | wp_termmeta | 38 | | wp_terms | 396 | | wp_usermeta | 2701 | | wp_users | 71 | +--------------------------+-----------+ 30 rows in set (0.00 sec)
mysql> SELECT table_schema AS "ebdb", ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Tamaño (MB)" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+--------------+ | ebdb | Tamaño (MB) | +--------------------+--------------+ | curso1 | 4.05 | | ebdb | 3946.50 | | farodb | 640.95 | | gym | 0.70 | | information_schema | 0.16 | | live | 8.88 | | musica | 712.17 | | mysql | 3.94 | | netfam | 0.55 | | performance_schema | 0.00 | | PFE | 57.86 | | plugins | 0.67 | | quirospacio | 4.25 | | sici1 | 17.09 | | sici2 | 16.61 | | sys | 0.02 | +--------------------+--------------+ 16 rows in set (2.17 sec)
sudo apt update sudo apt install build-essential apt-transport-https lsb-release ca-certificates curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -curl -sL https://deb.nodesource.com/setup_11.x | bash -curl -sL https://deb.nodesource.com/setup_10.x | bash -sudo apt install nodejsnode -v npm -v
sudo apt update sudo apt install snapd
sudo snap install node --channel=12/stable --classicsudo snap install node --channel=11/stable --classicsudo snap install node --channel=10/stable --classiccd ~/ nano http_server.js
const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello Worldn');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
node http_server.js