Some Linux Commands

Date and time

  • date (show system date)
  • cal 9 1751( show calendar)
  • date mmddhhmmssyy ( set date & time)
  • date 12051145302008

Find

  • find / -name sam.txt (find a file)
  • find / -iname sam.txt (search with capital & small)
  • find / -size 1 mb (find files with 1 mb size)
  • find / -size +1mb (find files > then 1 mb)
  • find / -size -1 mb (find files <then 1 mb)
  • find / -usr marc (find  user marc,s files )
  • find / home –user marc (find user march in home )
  • stat /data/sam.txt (displays file properties)
  • touch /data/sam.txt (update the time)
  • touch logitech
  • find / -atime +10
  • find / – atime -10
  • find / -mtime +10
  • find / -mtime -10
  • find / -name india.txt –not –user mann
  • find / -name kashmir.txt –not user root
  • find / -name india.txt –not –size -10mb
  • find / -name india.txt –and –user mann –not –size +10mb