How to search for a file or directory in Linux Ubuntu machine


I created an EC2 instance (Ubuntu 64 bit) and attached a volume from a publicly available snapshot to the instance. I successfully mounted the volume. I am supposed to be able to run a script from this attached volume using the following steps as explained in the tutorial:

Log in to your virtual machine. mkdir /space mount /dev/sdf1 /space cd /space ./setup-script

The problem is that, when I try: ./setup-script I got the following message: -bash: ./setup-script: No such file or directory

What is the problem ? How can I search for the ./setup-script in the whole machine ? I'm not very familiar with linux system. Please, help.

For more details about the issue: Look at my previous post: <a href="https://stackoverflow.com/questions/12544502/error-when-mounting-drive" rel="nofollow">Error when mounting drive</a>


# Is it a script or an executable ? file /space/setup-script # Show us it is readable and marked executable ls -l /space/setup-script # Mark it executable chmod a+x /space/setup-script # Then try running it again? If you know it is shell script you can: bash /space/setup-script

If still not working, then we get into why it wont execute.

grep space /proc/mounts

Does the options it have noexec ?

Try mount -o remount,exec /space now try your instructions again.

NOTE: All commands presume you are 'root' user or you can 'sudo' each command.


It is possible that you have mounted the wrong device. I've just recalled a trick you can use to find the device name of an EBS volume in Linux, since it is often different from the device name reported in the AWS console. First unmount the device in Linux, then detach it from the instance using the AWS console, so we go back to the original state. Now run this command in Linux:

cat /proc/partitions

The command will show the volumes currently attached. The next step is to attach the volume to the instance using the AWS console, and then to run that same command again in Linux. You should see an additional line appear. This line will tell you the name of the device to mount. For example, I get this output in my Ubuntu instance:

major minor #blocks name 202 1 8388608 xvda1 202 80 8388608 xvdf

The first line was already there before I attached the volume, so I know this is my root volume. The second line is the one that appeared, so in this case, the device to mount would be /dev/xvdf.


  • Schedule `at` jobs with cygwin
  • #include : No such file or directory (even though source and header are in the same directory)
  • Error: boost/scoped_ptr.hpp: No such file or directory while using libkml
  • Swift Process - execute command error
  • rlwrap: Could not open master pty: No such file or directory
  • SSRS 2008 - Sorting within a group
  • Peer to peer/adaptive payments with paypal [closed]
  • Can a Collections.shuffle be considered equivalent to a series of Randoms?
  • PHP + XML - how to rename and delete XML elements using SimpleXML or DOMDocument?
  • Portable JRE on Linux - possible?
  • Where these are stored?
  • NSIS decompiler
  • Problem while Building a Setup Project for a windows Service?
  • Google Custom Search with transparent background
  • How to delay loading a property with linq to sql external mapping?
  • Insert into database using onclick function
  • Master page gives error
  • What is Eclipse's Declaration View used for?
  • How to set/get protobuf's extension field in Go?
  • Sending data from AppleScript to FileMaker records
  • Running a C# exe file
  • Join two tables and save into third-sql
  • Can I make an Android app that runs a web view in Chrome 39?
  • How to model a transition system with SPIN
  • Symfony2: How to get request parameter
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • ORA-29908: missing primary invocation for ancillary operator
  • Google cloud sdk not working when python points python3
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Why winpcap requires both .lib and .dll to run?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Matrix multiplication with MKL
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Proper folder structure for lots of source files
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • coudnt use logback because of log4j
  • How does Linux kernel interrupt the application?
  • Converting MP3 duration time