Re: what did I just do?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Cluff
Date:  
To: Main PLUG discussion list
Subject: Re: what did I just do?
Typing "cd" all by itself always takes you to your home directory. I
use it all the time to get back home.
Putting a -- usually signals to a program that you have put your last
option and the next item(s) will be a file or something else
"non-optiony". That allows you to do stuff like:

mkdir -- -test
ls -d -- -test
rmdir -- -test

All of the above commands would fail if you removed the -- because they
would interpret the -test as a(n) option(s).

Anyway, by putting in cd --, all the system saw was cd all by itself
because there wasn't anything after the --

Brian Cluff

On 07/28/2014 01:26 PM, Michael Havens wrote:
> I was trying to co up a level with 'cd ..', I messed up and typed in 'cd
> --'. what it appeared to do is take me to my home directory. I'm kind of
> afraid to do anything because I don't know what happened. ohhhh I think
> I know... '--' is an option statement and so not putting the option ii
> is like just saying 'cp'. Thanks for listening..... this has been a
> public service announcement.
> :-)~MIKE~(-:
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss