Category: tips and tricks
-
Enhance Server Security: A Step-by-Step Guide to Setting Up SSH Key Authentication and Disabling Password-Based Login
Secure Your Server: How to Implement SSH Key Authentication and Disable Password Login for Enhanced Protection
-
finding Postgresql index size and usage details
Gain valuable insights into PostgreSQL index size, parent table size, and usage details with a comprehensive query. This query provides a wealth of information, including the table name, index name, whether the index is a primary key or unique, the index’s readiness status, the number of rows in the table, and various statistics on index…
-
Finding disk space used by postgresql tables
Uncover valuable insights into the disk space usage of PostgreSQL tables with a simple query. To retrieve detailed information about the disk space occupied by each table, execute the following query This query provides a comprehensive view of size details for all user tables in the current PostgreSQL database. The results are formatted for easy…
-
fast method to find postgresql table’s approximate row count
Discover a swift method to estimate the row count of PostgreSQL tables, especially useful for large datasets. While the conventional SELECT COUNT(*) FROM table_name; is suitable for smaller tables, it becomes inefficient for substantial datasets. For large tables, where precision is not critical, consider using the following query for an approximate row count This query…
-
Print anything to PDF
In scenarios where a printer is unavailable, yet you wish to preserve the content of a page or document, converting it to a PDF file is a convenient solution. This proves especially useful for storing online transaction details or any information for later reference. To achieve this, you can utilize a software called doPDF, which…
-
Create file of a specific size in Linux
Learn a quick and efficient way to generate a file of a specific size in Linux. Use the following command to create a 999 KB file named ‘heyitissimple’ Feel free to customize the size unit (‘K’ for Kilobytes) to match your requirements, choosing from various options like MegaBytes (M), GigaBytes (G), and more. This Linux…
-
Create file of a specific size in Windows
When the need arises to generate a file of a specific size in Windows, the ‘fsutil’ command comes in handy. Utilize the following command to create a file named ‘heyitissimple’ with a size of 999 KB: It’s important to note that the size value should be specified in bytes. In this example, the file size…