[ale] windows to Linux user conversion training guide
Scott Plante
splante at insightsys.com
Wed Aug 14 11:42:14 EDT 2013
I don't believe this is correct:
http://jimkinney.us/3.%2Bssh%252C%2Bscp%2Band%2Brsync.html
scp /path/to/files/ <username>@<hostname>:/path/to/new/files/* will copy all of the files to the /path/to/new/files/ location on the <hostname> system.
That produces "/path/to/files: not a regular file" error for me. Perhaps you meant:
scp /path/to/files/* <username>@<hostname>:/path/to/new/files/ will copy all of the files to the /path/to/new/files/ location on the <hostname> system.
Or alternatively:
scp -r /path/to/files <username>@<hostname>:/path/to/new/files
Of course, the -r will copy subdirectories as well (as I'm sure you know). I assume this was a typo, but perhaps some version of scp has special processing of a trailing asterisk?
~~~
On a broader note, especially for Windows users, I think it's important to discuss parameter expansion somewhere. I say particularly for Windows users because I believe (and my batch file skills are minimal) that in Windows, the individual commands are responsible for expanding converting wildcards into individual files, whereas that happens before the individual command sees the arguments in *nix. So in Windows, when you type:
copy *.txt C:\temp
The copy command sees those two arguments and is responsible for figuring out that the current directory has a.txt b.txt and c.txt. It can be a subtle difference for new shell users at first, but an important one, that here the shell expands those arguments before the command sees them. So a similar line in Linux:
cp *.txt /tmp
Would appear to the cp command as:
cp a.txt b.txt c.txt /tmp
It has no idea whether you typed out the individual files or typed "*.txt". (The cp command *likes* to be anthropomorphized! )
Maybe you feel that's too advanced a concept for this guide, and as I've just demonstrated, it's difficult to explain it very clearly ;-) but I've noticed new users get very confused about why commands sometimes act the way they do in Linux because of this difference. I wish I could remember a particular example right now--perhaps others on the list will add some.
Scott
----- Original Message -----
From: "Jim Kinney" <jim.kinney at gmail.com>
To: "Atlanta Linux Enthusiasts - Yes! We run Linux!" <ale at ale.org>
Sent: Tuesday, August 13, 2013 7:41:33 AM
Subject: [ale] windows to Linux user conversion training guide
When I was working at another location, one of the tasks I got to do was to write a training guide to take a windows user and make them a command line junkie in Linux. It was a fun project and the students that used it were enthusiastic about the guide.
It's been far too long, but I finally extracted the bulk of that guide and put it up on my site for others to see. Feedback is welcome!
It's not complete and due to the removal of much very specific stuff from where it was written it's a bit clunky now. also the migration away from a good but proprietary wiki (Atlassian Confluence) to plain html is less than stellar. I plan to do more from a docbook version for later html publication as soon as I can.
the guide is at http://jimkinney.us for now.
--
--
James P. Kinney III
Every time you stop a school, you will have to build a jail. What you gain at one end you lose at the other. It's like feeding a dog on his own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
http://heretothereideas.blogspot.com/
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130814/e7d4247a/attachment.html>
More information about the Ale
mailing list