Difference between revisions of "Linux Commands"
From GWAVA Technologies Training
(→Disk) |
(→Disk) |
||
Line 5: | Line 5: | ||
gives you a quick overview of what disks are mounted and how full they are. | gives you a quick overview of what disks are mounted and how full they are. | ||
− | <code> | + | <code> |
df -h | df -h | ||
</code> | </code> | ||
Line 11: | Line 11: | ||
This is give you a total size of the directories under where this command was run and sorts by size. Warning can take a long time. | This is give you a total size of the directories under where this command was run and sorts by size. Warning can take a long time. | ||
− | <code> | + | <code> |
du -hsx * | sort -rh | head -10 | du -hsx * | sort -rh | head -10 | ||
</code> | </code> | ||
Line 17: | Line 17: | ||
List of files | List of files | ||
This always works (show file size in bytes) | This always works (show file size in bytes) | ||
− | <code> | + | |
+ | <code> | ||
ls -s | ls -s | ||
</code> | </code> | ||
This is a SLES alias of the above | This is a SLES alias of the above | ||
− | <code> | + | |
+ | <code> | ||
l | l | ||
</code> | </code> | ||
This shows the file size in human readable values (K,M,G) | This shows the file size in human readable values (K,M,G) | ||
− | <code> | + | |
+ | <code> | ||
l -h | l -h | ||
</code> | </code> |
Revision as of 21:46, 22 October 2015
Useful Linux Commands
Disk
gives you a quick overview of what disks are mounted and how full they are.
df -h
This is give you a total size of the directories under where this command was run and sorts by size. Warning can take a long time.
du -hsx * | sort -rh | head -10
List of files This always works (show file size in bytes)
ls -s
This is a SLES alias of the above
l
This shows the file size in human readable values (K,M,G)
l -h
Download a file
Download the Latest Version of Retain
wget "http://download.gwava.com/download.php?product=Retain&version=current"
Find a file
find / -name "httpd.conf"