Linux interview questions and Snippets for daily use on Linux :P

Monday, October 28, 2013

To know the time taken by a command

time ls
time echo "print 40*123" | /usr/bin/python
time grep smthin *

Output
grep: workspace: Is a directory

real    0m19.289s
user    0m16.983s
sys    0m0.282s


Posted by Detonator at 1:45 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2014 (2)
    • ►  January (2)
  • ▼  2013 (15)
    • ►  December (2)
    • ►  November (5)
    • ▼  October (8)
      • To see all CPU's input command "top" at terminal...
      • To know the time taken by a command time ls time...
      • To know where your file is mounted df -Ph /users...
      • Unzipping .gz gzip -d myfile.gz
      • Unzipping .tar.gz Note that .tgz is the same thin...
      • Finding all NIC's on a machine ifconfig -a|grep ...
      • Search for a string in files in a folder grep "a...
      • Listing Directories in Linux: ls -lrt | grep -e ^...

Contributors

  • Detonator
  • gaurav
Simple theme. Powered by Blogger.