I am working with Ubuntu version 18.04.4 LTS. I tried to create a file using the following command: sudo cat > filename.yaml and received a "Permission denied error" I can create the file using the VIM editor and sudo. Please advise.
Asked
Active
Viewed 2,706 times
1 Answers
0
I'm not an expert on cat but I suspect the command as you've entered it above will produce an error by design. Cat is used to print and concatenate files.
Example commands with cat are cat filename.yaml which will print the contents of filename.yaml to standard output (i.e. the terminal); while cat file1.yaml file2.yaml > filename.yaml will combine the contents of the existing files file1.yaml and file2.yaml into a new file called filename.yaml.
Concrete_Buddha
- 171