1 Answer
- Newest
- Most votes
- Most comments
0
Assuming you get that error message when you run the first command (source ~/.bashrc
) it's saying there isn't a .bashrc
file in your home directory - which will be /home/username/
so check there to make sure the file exists.
Relevant content
- asked 7 years ago
- asked 3 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a month ago
Here is the command sequence cd /home/ec2-user ls -a finds the .bashrc file vi .bashrc opens it but when i run the auto.sh file source /home/ec2-user/.bashrc or source ~/.bashrc cd ~/data python file.py I get: No such file or directory: line 1: /home/ec2-user/.bashrc
i do sh data/auto.sh
First line in auto.sh file: source ~/.bashrc I tried changing the path, changing the file name, creating a directory, copying the file to a new directory. The result is the same: No such file or directory: line 1: /home/ec2-user/.bashrc
If I enter: bash data/auto.sh (second line in the file: cd ~/data) I get an error: No such file or directoryhome/ec2-user/data
Or do I just need to run a python script on a schedule :-)
Guessing: Check the owner/permissions on
auto.sh
just in case there is something strange there. Also: Check for special characters inauto.sh
- try creating it again in vi or something that is a plain-text editor.