[Techtalk] New to the list...new to linux

Kath kath at kathweb.net
Sat Sep 29 20:56:44 EST 2001


Depends.

The ending ones, like /dir2"/", you need when doing a copy like we are (at
least, I like to, as to be thorough).

The beginning "/", only if you are copying to another location entirely.
Let me clarify (sorry)

If you are copying files from a main directory into a subdirectory and you
are in the main directory correctly (lets say dir1 is the main directory and
dir1a is the subdirectory):

cp * dir1a/

That should be sufficient for that.

If you are copying somewhere beyond the directory tree of dir1/ use all the
slashes for a complete path.

Lets take a potential real world example of that and stop being so abstract:
You want to copy the source files for something you downloaded into your
home directory.  I'll call this something "foobar" and it is in a directory
known as foobar/ in /usr/src/  We will also assume your home directory is
/home/tianna/

The command would be:

cp /usr/src/foobar/source/* /home/tianna/

That would copy everything in source/ to /home/tianna/

Anything else you need clarified?  Do you know how the Unix directory
structure works? It is essentially the same as Windows, really.

- k

----- Original Message -----
From: "Tianna Thomas" <tiannat at hitsites.com>
To: <techtalk at linuxchix.org>
Sent: Saturday, September 29, 2001 8:24 PM
Subject: RE: [Techtalk] New to the list...new to linux


> Do I need the /'s ?
>
> Me=clueless
>
> Tianna
>
> -----Original Message-----
> From: Kath [mailto:kath at kathweb.net]
> Sent: Saturday, September 29, 2001 5:22 PM
> To: Tianna Thomas; techtalk at linuxchix.org
> Subject: Re: [Techtalk] New to the list...new to linux
>
>
> I think:
> cp /dir1/* /dir2/
>
> or if you are already in dir1
>
> cp * /dir2/
>
> Would do that :)
>
> - k
>
> ----- Original Message -----
> From: "Tianna Thomas" <tiannat at hitsites.com>
> To: <techtalk at linuxchix.org>
> Sent: Saturday, September 29, 2001 7:57 PM
> Subject: [Techtalk] New to the list...new to linux
>
>
> > ACK!  I'm a Win NT admin trying to run a unix box for the first time and
> I'm
> > just learning...well...nothing!
> >
> > All of this command line stuff is giving me a serious headache...any
help
> > here would be appreciated.  Specifically, I need to copy the entire
> contents
> > of one directory into another directory...is there a way to do this all
at
> > once or do I need to do it file by file? (Now's the time when I miss
> > drag-n-drop and copy/paste).  Exact commands would be helpful...I'm
> > completely lost (and a little nutz by now).
> >
> > Oh yeah...HI EVERYONE!  You'll probably be seeing me a lot in the near
> > future.
> >
> > Thanks in advance for your help...
> >
> > Tianna
> >
> >
> > _______________________________________________
> > Techtalk mailing list
> > Techtalk at linuxchix.org
> > http://www.linuxchix.org/mailman/listinfo/techtalk
>
>
>
> _______________________________________________
> Techtalk mailing list
> Techtalk at linuxchix.org
> http://www.linuxchix.org/mailman/listinfo/techtalk





More information about the Techtalk mailing list