Synology Nas: Run Fsck To Check and Repair a Linux File System
I own a Linux powered Synology dedicated Network Attached Storage (NAS) server for my home office use. How do I run fsck on Synology DiskStation that offers RAID storage using Linux command line...
View ArticleConvert HTML Page To a PDF Using Open Source Tool [ Linux / OS X / Windows ]
Do you need a simple open source cross-platform command line tool that converts web pages and HTML to a PDF file? Look no further, try wkhtmltopdf. From the project home page:Simple shell utility to...
View ArticleUbuntu / Debian Linux Server Install Keychain SSH Key Manager For OpenSSH
I do not want to start ssh-agent and ssh-add as described here to manage my ssh keys for password less login. How do I install keychain software to manage my keys running on Debian or Ubuntu based...
View ArticleLinux Find Out What Compilers Are Installed or Available On The System
How do I find out what compilers are installed under Debian / Ubuntu / Red hat Enterprise / CentOS Linux operating systems? How do I list all available compiler packages under Linux?Read answer to:...
View ArticleLinux / Unix: sed Command Print Only Matching Lines
I see many examples and man pages on how to do operations like search-and-replace using sed. But, I want to match a given string or a regular pattern expression and display on the screen. How do I...
View ArticleHowTo: Revoke OpenSSH Keys and Disable User Access
Many uses ssh to log into a remote machine and append the indicated identity file to machine's ~/.ssh/authorized_keys file. I recently moved one my server and I would like to revoke openssh keys and...
View ArticleHowTo: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Dear nixCraft,I carry my Linux powered laptop just about everywhere. How do I protect my private data stored on partition or removable storage media against bare-metal attacks where anyone can get...
View ArticleHowTo: Use Grep Command In Unix / Linux To Search Subdirectories
I would like to search and find all files which contain a word called "main()" for all directories located in $HOME/project/school. How do I use the grep command to find text including all subdirs...
View ArticleLinux dd Command Show Progress Copy Bar With Status
I'm using dd command for block level copy and just found out that there's no built in way to check the progress. How do I use the Linux or Unix dd command while coping /dev/sda to /deb/sdb and display...
View ArticlePHP Warning: fread(): Length parameter must be greater than 0 in...
One of my php script called setoptions.php is hosted on my new vps server. However, it is not working so I setup php error log as described here and, and I see the following warning repeated in my log...
View Articleagedu: Unix / Linux Command For Tracking Down Wasted Disk Space
Most sysadmin will run low on disk space. Users will demand more space and you need to free space. You will find out files that's a waste of space and delete it or move to an archive medium. But, how...
View ArticleLinux AWS: Find And Delete All Files Securely So That No One Can Recover It Ever
I'm currently using Amazon EBS block level storage volumes for use with Amazon EC2 instances powered by Red Hat Enterprise Linux. This volume stores critical webapp and user data. We are moving out to...
View ArticleUbuntu Linux Add Static Route
I've two network interfaces. One connected to eth0 and another connected to eth1 as follows: eth0 => private network with private IP in 10.x.x.x/8 range. eth1 => ISP router with public IP...
View ArticleLinux / Unix: Find and Delete All Empty Directories / Files
How do I find out all empty files and directories under Linux / Apple OS X / BSD / Unix like operating systems and delete them in a single pass?Read answer to: "Linux / Unix: Find and Delete All Empty...
View ArticleGrep Include Only *.txt File Pattern When Running Recursive Mode
I'm using Debian Linux as my development workstation. I would like to search a directory called ~/projects/ recursively for "foo" word only for *.txt files. How do I search all text files in...
View ArticleHowTo: Check Swap Usage in Linux
How do I check swap (paging) usage under Linux operating systems using command line options?Read answer to: "HowTo: Check Swap Usage in Linux"
View ArticleDebian / Ubuntu: Fatal error: Python.h: No such file or Directory
I'm trying to install 3rd party python apps using pip command and getting the following error: gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3...
View ArticleDebian / Ubuntu: Find Information ( Description ) About Installed Packages
I'm looking for equivalent of yum info httpd command under Debian Linux. How do I display information about the installed packages on the command line under Debian or Ubuntu Linux? How do I see the...
View Articlewget Command: Download Compressed File By Sending gzip Headers
I have turned on gzip compression as modern web browser supports and accepts compressed data transfer. However, I'm unable to do so with the wget command. How do I force wget to download file using...
View ArticleNginx Redirect (Rewrite) Old Domain To New Domain With HTTP 301
I've changed the domain name from long-domain-name-example.com to example.com which is shorter and easy to remember. How do I redirect old domain to new domain with "HTTP/1.1 301 Moved Permanently"...
View Article