1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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.
Contenido relevante
- preguntada hace 8 días
- preguntada hace un mes
- preguntada hace 18 días
- Como solucionar el error: Supplied Policy document is breaching Cloudwatch Logs policy length limit.Respuesta aceptadapreguntada hace 15 días
- OFICIAL DE AWSActualizada hace 3 meses
- OFICIAL DE AWSActualizada hace 10 meses
- OFICIAL DE AWSActualizada hace 3 meses
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.