command

216 - How to use mpstat

The mpstat command writes to standard output activities for each available processor, processor 0 being the first one. Global average activities
among all processors are also reported. The mpstat command can be used both on SMP and UP machines, but in the latter, only global average
activities will be printed. If no activity has been selected, then the default report is the CPU utilization report.

mpstat [ -P { cpu | ALL } ] [ -V ] [ interval [ count ] ]

-P : cpu number(0, 1, ...) or ALL
-V : Version Number

215 - nmap

nmap is a powerfull scanner available in Unix/Linux system. It’s very usefull for network exploration and security auditing.
It was designed to rapidly scan large networks, although it works fine againts single hosts.

Usage: nmap [Scan Type(s)] [Options] {target specification}

213 - Editor on Linux

Some Linux Based OS does not comes with your favorites editor. And maybe in some case the default editor is not the one you are used to.
For example, you need to update the crontab:

# crontab -e

pico or nano, (for example) opens up.

If you personally have a preference for VI and you wanted to change it to the editor you are used to.

To update the default editor you simply need to execute:

210 - Top-Level Domain (TLD)

A root name server is a name server for the Domain Name System's root zone. It directly answers requests for records in the root zone
and answers other requests returning a list of the designated authoritative name servers for the appropriate top-level domain (TLD).

The newest DNS root zoon on.

# dig @a.root-servers.net ns

204 - Top 5 large files in a directory

If you want to figure out large files in a specific directory.

# du -s /var/log/* | sort -nr | head -5

There are a lot of files in a current directory and want to figure out.

# du -s ./* | sort -nr | head -5

 

  • du

 This command is used to summarize disk usage of each file in a file system, recursively for directories.

198 - rm: cannot remove

When you try to delete directories & files, If you have the errors, even though you have a write permission.

rm: cannot remove `./data/test.txt': Permission denied
rm: cannot remove directory `./data/files': Permission denied

1. chmod the permission on those.

197 - iostat

The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation
to their average transfer rates. The iostat command generates reports that can be used to change system configuration to better balance
the input/output load between physical disks.

iostat is part of the sysstat package, so go ahead and install it :

194 - System Upgrade for ubuntu

1. Install newest version of packages on a machine

This command installs the latest versions of any out-of-date packages on your system. It never installs a package
that is not yet installed.

# sudo apt-get upgrade

2. Upgrade all packages on the system.

This command installs up-to-date version of packages, and may install additional packages.

192 - Search Open Ports for Linux Server

1. nmap Command.

# nmap 192.168.17.1
# nmap 127.0.0.1

2. nd Command.

# nc -z 192.168.10.61 1-1023

Run nc command with -z flag. You need to specify host name / ip along with the port range to limit and speedup operation.

3. Close a port

187 - Java Decompiler (Jad)

Jad (Java Decompiler) is a decompiler for the Java programming language. Jad provides a command-line user interface to extract source code
from class files. A graphical user interface for Jad is JadClipse which is a plugin to the Eclipse IDE.

< Install jad >

1. Download jad158e.linux.intel.zip for RedHat

URL:   http://www.varaneckas.com/jad

2. Unzip jad.zip file into any appropriate directory on your hard drive.

This will create two files: jad, Readme.txt

Syndicate content