Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to write a BASH script to return the following information from CPUINFO using the following commands

  • ./ -r to return the time along with total number of eth0 packets.
  • ./systemstat -c to return the vendor_id= and cpu MHz=.

When I use those commands, I recieve -bash: ./ No such file or directory.

share|improve this question

This is because you don't have in your current directory .. The dot means the "current directory" or "working directory". If you do ls . you will notice that the script isn't there. For running this script you should either use:

  • the full path /path/to/script/
  • copying them to a bin directory cp /usr/local/bin/ then run without the dot:
  • Or adding the directory where the script is to the path PATH=/path/to/script:$PATH and then execute the script without the dot.
  • or move your working directory to were the script is cd /path/to/script && ./
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.