Академический Документы
Профессиональный Документы
Культура Документы
ifconfig to check the ip address (View all the interfaces along with status)
free m check the memory status in Megabyte.(Total, used, free, shared, buffers, cached)
df -h Displays output in human readable form. i.e size will be displayed in GBs
du -h file1.php Displays the storage capacity of file1.php (Ans eg:- 8.0K file1.php)
du -s images Displays the total disk space used by the specified directory. (Ans Eg:- 1544 images)
Pidof firefox Command checks the process status number of winamp. Then Type ps 3691
ps 3691 3691 is firefox process value number, this command show current running status.
Kill 3691 use this command to kill the process running 3691 that is firefox.
ls command display files in the current directory(Directory in Blue colour & File in White)
ls lrt | more List files by date. See also newest and find_mm_yyyy.
Cat > file1 create a new file & Press the Control D.
cat file file2 > file3 Joins two files File1, File2, & Stores the output in a File3.
sudo command Give the super user Access. And it changes from $ to # Promote.
mkdir songs creates a new Directory (Folder) Song in present working folder or directory.
history -d $num eg:- History d$1005 (display list of commands in your history. Find the
number next to the one you want to delete and run)
cat shiva | less commands are used for dividing a long file into readable bits. Ctrl + Q to end
cat shiva | pg Used for dividing a long file into readable bits Press enter to page by page.
cat shiva | more Used for dividing a long file into readable bits Page by Page Press Enter.
cat shiva | grep -i a To search file starting with a in the Filename Directory(apple, ant)
cat shiva | grep a Its search in shiva folder character string for a (apple, bat, cat).
cat shiva | grep t$ It search for only last two letter ending with t (Eg:-Bat, ant, eat)
cat shiva | grep E p\{2} It search PP two same letter (Eg:- apple)
cat shiva | grep a\+t It will search for letter for at (Eg:- bat, eat, seat) in shiva folder.
find -mtime +180 -exec rm -rf {} \; we can delete logs which are older than 180 days.
i Insert mode need to use up & Down arrow to move the cursor.
Apachectl graceful save the edited data in apache & restart apache.
chmod change mode Using this command we can set permissions (read, write, execute)file/Directory.
chgrp Command can change the group ownership with chgrp group filename.
Absolute (Numeric) Mode:-
Symbolic Mode:-
UserDenotations
U User/Owner
g Group
o Other
a All
find -mtime +180 -exec rm -rf {} \; we can delete logs which are older than 180 days
gzip -l *.gz Display compression ratio of the compressed file using gzip l
compressed uncompressed ratio uncompressed name
23709 97975 75.8% asp-patch-rpms.txt
ps -efH | more To view current running processes in a tree structure. H stands for process hierarchy.
copy the Jboss Log that is server.log file from server wmkt001cnc from 14-07-0 to 9 date
scp root@wmkt001cnc:/var/log/jboss/server.log.2014-07-0? .
service --> Red Hat/Fedora command to display status of system services. Example: service --status-all
du -sh --> Calculates file space usage for a given directory. (and everything under it) (-s option
summarizes)
cd /var/log
cd httpd
ls -lrt
cd /var/log/jboss
ls -lrt
tail -f access_log
/dev/mapper/vg00-lv00
961M 356M 557M 39% /
/dev/mapper/vg00-lv01
/dev/mapper/vg00-lv05
/dev/mapper/vg00-lv02
/dev/mapper/vg00-lv04
/dev/mapper/vg00-lv03
Searching
find . -name filename Searches in the current directory (represented by a period) and below it, for
files and directories with names starting with filename
pgrep pattern Searches for all the named processes , that matches with the pattern and, by default,
returns their ID
System Info