How do I see files and directories in an EC2 instance?

Viewed 8761

I am connected to my ec2 instance and I am trying to see all of the files/directories on the instance. I am using ls but nothing is showing up.

How do I see files and directories in an EC2 instance?

1 Answers

To show all files in your home folder, use ls -la.

To copy files form local workstation to instance, your scp command is missing a destination folder. The following should overcome the issue (note :. at the end):

scp -i "[pem]" -r /[directory] ec2-user@ec2-[ip].amazonaws.com:.

Also since you have /[directory] this will look for the [directory] in the root of your filesystem, not your current working directory. For that, you can use (note .):

scp -i "[pem]" -r ./[directory] ec2-user@ec2-[ip].amazonaws.com:.
Related