The simplest form of ln
is this to create a symlink:
cd /home/tuna/myfolder
ln -s /home/tuna/objects/oops.c
cat oops.c # This will print the file
What exactly do you mean when you say "when I look it is empty"?
An extract from ln
's man page, just to clarify things:
ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
ln [OPTION]... TARGET (2nd form)
ln [OPTION]... TARGET... DIRECTORY (3rd form)
ln [OPTION]... -t DIRECTORY TARGET... (4th form)
Your original code is the 3rd form which tries to create a symlink to /home/tune/objects/oops.c
in the folder oops.c
.
You should use the 2nd form which creates a symlink called oops.c
in the current folder, pointing to home/tuna/objects/oops.c
.