Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Imp Linux Commands

The document lists various useful Linux/Unix commands for checking file versions and locations, installing scripts, viewing partition and memory information, monitoring backups and cloning, searching and removing files, and deleting files by month. Some example commands are strings and grep to check file versions, parted and df to view partitions and disk usage, du and ls to check directory and file sizes, uptime to view server uptime, and vmstat to view memory information. Find, sort, awk and xargs are also used with various options to search, sort and remove files.

Uploaded by

vayusena69
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Imp Linux Commands

The document lists various useful Linux/Unix commands for checking file versions and locations, installing scripts, viewing partition and memory information, monitoring backups and cloning, searching and removing files, and deleting files by month. Some example commands are strings and grep to check file versions, parted and df to view partitions and disk usage, du and ls to check directory and file sizes, uptime to view server uptime, and vmstat to view memory information. Find, sort, awk and xargs are also used with various options to search, sort and remove files.

Uploaded by

vayusena69
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1 Some

Check

useful Linux/Unix Commands


the forms version:

strings -a $AU_TOP/forms/US/sachin_test.fmb | grep '$Header' strings -a $SACHIN_TOP/forms/US/sachin_test.fmx | grep '$Header'


Install

our own script

install -c /usr/local/bin
List

the information for partitions

[root@erp ~]# parted -l


Monitor

backup in RHEL 5

[root@erp ~]# watch df -m


Check

the size of a directory

[root@erp ~ ]# du -sch .
Monitor

rapid clone

[root@erp ~]# tail -f file_name_with_location


Check

the last updated file name on current location

[root@erp ~]# ls -lrt | tail -1 -rwxr-xr-x 1 root dba 41 Feb 22 01:33 new2.sh
Get

the CPU info

[root@erp ~]# vi /proc/cpuinfo [root@erp ~]# vi /proc/slabinfo

Remove

the last updated file

[root@erp ~]# ls -lrt | tail -1| awk {print $9}|xargs rm -f


Check

the server up time

[root@erp ~]# uptime


Get

the Information about memory

[root@erp ~]# vmstat [root@erp ~]# vmstat -m Alternatively ,we can check with the following command. [root@erp ~]# iostat -t 10 5
Search

and remove files

$find . -name file_name | xargs -i rm -rf {}


Top

10 file regarding there size:

find . -type f | xargs ls -s | sort -rn | awk {size=$1/1024; printf(%dMb %s\n, size,$2);} | head or du -xak . | sort -n | awk {size=$1/1024; path="; for (i=2; i 50) { printf(%dMb %s\n, size,path); } } or du -a /var | sort -n -r | head -n 10
Delete

the files by Month

ls -lh | awk {print $6 $9} | sed -n /Mar/p | xargs rm -rf

You might also like