It’s funny how programmers get in a "rut", using the same old coding habits and command line syntax for years on end. I just found that you can create new directories and subdirectories with a single Unix mkdir command using the -p parm. mkdir -p top_level_directory/child_directory/another_child_directory And if you’re curious, this won’t work (I tried […]
Tag: unix
Need to monitor Linux server performance? Try these built-in commands and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed […]
Netcat or nc (the command) is a networking utility for debugging and investigating a network, typically by creating and utilizing raw TCP/IP connections. Â Known as “The Swiss Army Knife for TCP/IP”, nc is used to read or write to network connections using TCP or UDP. It’s raw features include: Outbound or inbound connections, TCP or […]
An intrusion detection system (IDS) can perform log analysis, check file integrity, monitor policy changes, and keep an eye out for rootkit installations and alert you when a threat is first suspected. The IDS that I chose for my host was OSSES HIDS, an open source host-based Intrusion Detection System offered by Trend Micro. Here’s how I installed OSSEC on my hosted Linux VPS and Splunk on a local Windows machine to monitor.
My firewall caught some odd injection attempts which lead to research on the intent of the hackers. Turns out it was an attempt to gain Shell access via Local File Inclusion vulnerabilities and injection of malicious code in proc/self/environ. Research lead to the following step-by-step instructions on what was being attempted (listed below).
.htaccess files (or “distributed configuration files”) provide a way to make configuration changes on your Wordpress site on a per-directory basis. A .htaccess file, containing one or more configuration directives, is placed in a particular document directory on your Wordpress site, and the directives apply to that directory, and all subdirectories thereof. Using directives in .htaccess, you can block spam, secure your website, and control other website actions.
I recently moved several WordPress blogs from DreamHost to a new 1and1 Virtual Private Server installation. Here are directions and screenshots of the move along with notes on problems that I ran across (and the resolution I found). I moved from a DreamHost shared host plan that killed scripts when memory consumption exceeded 100MB to a 1and1 VPS solution that provides 4,000MB of burst RAM.
Passwordless logins in Unix
Connecting via SSH, requires a user provide his identity to the remote machine using one of several methods. One method lets you access the remote system without entering a password at each login. Normally, when you log in to a system, you authenticate by entering your password for that system. Your password goes, as it is typed, to the remote system, which authenticates it against the /etc/passwd or /etc/shadow file. By contrast, SSH allow a “password-less” authentication method based on public-key cryptography.
Useful Unix Commands
Useful Unix commands To search text in files and all subdirectories find [directory] -name [files] | xargs grep [text to search for] Example to find “insert” in the odb directory (search all files in that directory): find odb -name “*” | xargs grep “insert” Run job in batch now at -s now < thejob.sh List […]