-2

I have got a question were I have to create a symbolic link named "new" to file /test/test1/test2. The current command I have is this:

ln -s /test/test1/test2 /new

I am not if there is a specific command which will create it in the current directory? any help would be much appreciated.

Thank you.

Mat
  • 202,337
  • 40
  • 393
  • 406
mecrvmancer
  • 7
  • 1
  • 1
  • See: [How to symlink a file in Linux?](http://stackoverflow.com/q/1951742/3776858) – Cyrus Mar 13 '16 at 20:59
  • 1
    This belongs in [SE *Nix](http://unix.stackexchange.com/). Even though I doubt they'd answer it there. Seems like a classic case of RTFM. – franklin Mar 13 '16 at 21:06

1 Answers1

0

Just omit the leading / in the target name.

ln -s /test/test1/test2 new

If you want to be explicit, use . as the name of the current directory:

ln -s /test/test1/test2 ./new
chepner
  • 497,756
  • 71
  • 530
  • 681