linux

Linux commands


Size of file in the current directory

du -s <file-name>.extension

Display the same data, but in a "human-readable" size format, and display a grand total:-
du -sh<file-name>.extension

Shows the amount of disk space used and available on Linux file systems:-
df

du -mh
du -gh
free –m = memory consumed by RAM
df –kh = disk space checking by File System

du –sh <file/folder directory name> = file/folder in size human readable format


cat /proc/cpuinfo = No of CPU usage (or) CPU list or CPU information.
cat /proc/meminfo = Total Memory (or) Used Memory (or) Free Memory
=================================================================

netstat –an | grep <Port No: 7001> = LISTEN/CONNECTED
ifconfig = ip address of the host.
netstat –an = All server ports will be displayed
ping  google.com = To check HOST is reachable (or) not
telnet <destination> <port no>
nslookup  irctc.co.in = It is used for querying the Domain Name System (DNS) to obtain domain name or IP address mapping information
service network restart = to restart the networking service.
================================================================

poweroff = Means shutdown the machine
----------------------------------------------------

ps -ef | grep java = To Check all java processes running on the server
------------------------------------------------------------------------------------
pwd = present working directory
cd ../../= Two steps backward slash
clear =clear the screen
exit = exits the command line or the account
tar xvf httpd-2.4.37.tar
cd bin = change directory to bin directory
========================

ls
ll
ls -lrt = list files
ls -lart = Hidden files
ls -lrt /apps/

=========================================
find . -name <file/folder> = find the file of the directory
vi magic = vi editor to open magic file
vi boot.properties = create the file boot.properties.
================================================

cd ../Desktop/ = One step back and one step forward
$cp calendar.war calendarr.war .                               copy file to present working directory
cp calendar.war /home/raghu/calendar.war               copy file to home directory
rm calendarr.war                                                        remove file.
mv calendarr.war    <destination>                             move command

ifconfig:
==================================================

ifconfig                                                                       To check machine ip address
ifconfig -a is passing the parameter a.

hostname                                                                     host name of the machine

cat /proc/cpuinfo = Cat command is used to see the content in command line
cat /proc/meminfo = Cat command is used to see the content in command line

top = to check top processes running on the server

netstat:
=======================================
netstat -an | grep
netstat = Netstat provides information and statistics about protocols in use and current TCP/IP network connections.
netstat -an
netstat -an |
history = will display entered commands up to now

AT command reference

linux

Comments

Popular posts from this blog

Bsu

Domain