Sunday, 19 February 2017

Basic Commands

1. Command : ​df -h 

Description : To display information of all file system statistics in GB (Gigabyte)  

2. Command: free 

Description : retrieves the ram usage information 

usage: free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]
  -b,-k,-m,-g show output in bytes, KB, MB, or GB
  -l show detailed low and high memory statistics
  -o use old format (no -/+buffers/cache line)
  -t display total for RAM + swap
  -s update every [delay] seconds
  -c update [count] times
  -V display version information and exit


3. Command : locate *exactfilename*

Description: this command helps to find the location of a file if we know the file name

locate "*.png"

Another way is : find / -type f -name "file*"  

/ is used to do the search on all directories similar to locate.

If we want to do find the file on our current directory , the command should be modified like : 

find . -type f -name "file*"

No comments:

Post a Comment