cd /
cc usr/home/user1/c! / tom.c
root
can write to/change anything in this directory. Specify an ‑o
utput file to overrule this behavior.cc -o ~/my_executable ~/my_program.c
i wish I knew a way to get the error text into a file so I could attach it.
cc … 2> /tmp/error.txt
$ cd /
$ cc usr/home/user1/c!/tom.c
/usr/bin/ld: cannot open output file a.out: Permission denied
cc: error: linker command failed with exit code 1 (use -v to see invocation)
wouldn't a.out be wirtten to the the file where the source code is?
tags please.
TheI believe I tried to do this as root
$
prompt suggests you're a 'regular' user.Fixed that. It's not nearly as bad as posting a 100MB jpeg for three lines of text, but still, not great.Copy and paste them