prushik on 14 Dec 2016 12:14:05 -0800
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Symlink Problem
|
- From: prushik <prushik@gmail.com>
- To: PhiladelphiaLinuxUser'sGroupDiscussionList <plug@lists.phillylinux.org>
- Subject: Re: [PLUG] Symlink Problem
- Date: Wed, 14 Dec 2016 15:13:06 -0500 (EST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:message-id:mime-version; bh=1XpbALEEDZyblmifgwowOPIkGFz1YlXvIX/HicMEH1U=; b=R/TmIPPGZET7vkOKt0c+5tn0Npv2BfvtZQg9VA7KM27JCU/l2aV7V9+GVCnUu1XuBU AJOWuaJ2ArYmOM/cRHQwIHMhFnj9fkTkrtMk05m1vjm2vAY3aToULBMj8FHbPZTTnD4k KhQ3JS8KnYONQ4aQAMWr5nLC/PdXqIhs5ZbFaJQerKbBUl+Q5bEFNMF2cBZ+CpuzRVrS rwcYihmiCh4osNxXnlNWLbvqFYZwnfGflZyH+70sBZerrPoL4eA3ClGoBDmePC64tT6f pKarRoMILwER1PsOpNLJpw2TxbJsozbZsy4vVaSQRTlo2avd1Vnqd4Uc26IFIz8wAEuw qJmQ==
- Reply-to: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
- Sender: "plug" <plug-bounces@lists.phillylinux.org>
Sounds like you created the /docs directory before making the symlink. If you do that ln assumes /doc is the destination dir for the new symlink, not the name and path for the symlink.
Sent from my device.
---- Original message ----
From: Casey Bralla <MailList@nerdworld.org>
Sent: 12/14/2016 15:04:46
To: plug@lists.phillylinux.org
Subject: Re: [PLUG] Symlink Problem
On Wednesday, December 14, 2016 03:00:43 PM Thomas Delrue wrote:
> On 12/14/2016 02:52 PM, Casey Bralla wrote:
> > I executed: "ln -s "/files/document /docs" to create the symlink.
> > But when I do a listing of "/docs", I get this:
> >
> > #ls -lap /docs total 8 drwxr-xr-x 2 root root 4096 Dec 14 14:44 ./
> > drwxr-xr-x 29 root root 4096 Dec 14 14:43 ../ lrwxrwxrwx 1 root root
> > 15 Dec 14 14:44 document -> /files/document
> >
> > If I list the "/docs/document" directory, I get all my documents
> > listed as I expected.
> >
> > Can somebody explain to me what I'm doing wrong? It all seems so
> > simple, but I'm screwing it up somehow.
>
> yes, everything is working as expected.
> when you do (I use -hal but your -lap works similarly):
>
> $> ls -hal /docs
> What you are asking is: shows me the info for the entry "/docs".
> This happens to be a 'file' (special one at that - it's a symlink) and
> not a directory so you can think of this being the same question as:
> $> ls -hal /path/somefile.txt
>
> When you do that, it just shows you the info for /path/somefile.txt
> So ls is doing exactly what you are asking it (I'll stop yelling RTFM
> now, I promise)
>
> Instead, you want to descend into /docs, so what you really want to ask
> ls to do is this:
>
> $> ls -hal /docs/
> (did you notice the trailing / ???)
>
> That will make it descend into it and show you the content of /docs/
> instead of the entry for docs..
Thomas, thanks for quick reply, but adding the trailing "/" still gives me the
"document -> /files/document" link and not the listing of files.
--
Casey Bralla
Chief Nerd in Residence
The NerdWorld Organisation
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug