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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: