I am trying to a access the error log of my Digital Ocean Django droplet.
When I try to charge directory from the / to /var/log/nginx/error.log I get
-bash: cd: error.log: Not a directory
You can't change directory to a file. You would cd to the folder that holds the file first:
From there you can manipulate with just error.log:
vim error.log # edit/view file tail error.log # view last lines of file cat error.log # output contents of file to screen
You can however do any of those commands with the full path as well (and do it from anywhere):
vim /var/log/nginx/error.log # edit/view file tail /var/log/nginx/error.log # view last lines of file cat /var/log/nginx/error.log # output contents of file to screen