[R] help for
John McKown
john.archie.mckown at gmail.com
Fri Dec 30 19:46:38 CET 2016
On Fri, Dec 30, 2016 at 12:08 PM, Sarah Goslee <sarah.goslee at gmail.com>
wrote:
> This isn't an R question, but a linux question.
>
> Open a new terminal window:
> The directions you are following tell you how to do that for the
> Ubuntu linux being used, right at the beginning:
>
> Open up a terminal (Applications->Accessories->Terminal from the the
> toolbar)
>
> As for your command, the $ is a prompt. You don't type that. Start with ls
>
> What should you do now? Read a little bit about using linux command line
> tools
>
Well, this being the R language forum, perhaps you should enter "R" after
the command prompt?
Seriously, what do you want to accomplish? Since you are using Ubuntu, I
will assume that you are using the default shell program, BASH. There is a
BASH forum you could join called mailto:help-bash at gnu.org . It's easiest to
sign up here:
https://lists.gnu.org/mailman/listinfo/help-bash
This site has some nice articles about BASH and programming (scripting)
using it: http://wiki.bash-hackers.org/
BASH for beginners: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/
Since you seem to be using Ubuntu:
https://help.ubuntu.com/community/Beginners/BashScripting
There are _TONS_ of commands installed in Ubuntu by default. Most of them
have manual (man) pages. Most of the defaults are in the directory
/usr/bin. You can list them simply by entering the command: "ls /usr/bin".
My system has over 6,500 programs stuffed in there. If you see something
interesting, you can get some basic documentation on it by using the
command: "man <cmd-name>". We've mentioned "ls", which lists the contents
of a directory. If you want to know more, try "man ls". In addition to
"man" there is a much more powerful information source called "info". Just
use it instead of "man" as the command name. That is, use "info ls" to get
some real detailed information on the ls command.
Another interesting command is "apropos". Think of it as being similar to
the R systems' double question mark search. As an example, suppose you want
to find out what commands might be helpful with a "zip" file. Enter the
command: "apropos zip". On my system, I get a (truncated) response such as:
bunzip2 (1) - a block-sorting file compressor, v1.0.6
bzip2 (1) - a block-sorting file compressor, v1.0.6
bzip2recover (1) - recovers data from damaged bzip2 files
bzless (1) - file perusal filter for crt viewing of bzip2
compressed text
decode (n) - Access to zip archives
encode (n) - Generation of zip archives
funzip (1) - filter for extracting from a ZIP archive in a pipe
gunzip (1) - compress or expand files
gzip (1) - compress or expand files
IO::Compress::Bzip2 (3pm) - Write bzip2 files/buffers
IO::Compress::Zip (3pm) - Write zip files/buffers
IO::Uncompress::Unzip (3pm) - Read zip files/buffers
unzip (1) - list, test and extract compressed files in a ZIP
archive
unzipsfx (1) - self-extracting stub for prepending to ZIP archives
zforce (1) - force a '.gz' extension on all gzip files
zip (1) - package and compress (archive) files
zipcloak (1) - encrypt entries in a zipfile
Note the number in the parentheses after the command. A "1" indicates this
is a normal command. Something which starts with a "3" (like 3pm) means
this is like a subroutine package (The "pm" in 3pm means "Perl Module" -
like an R package, sort of). Also note that some of the entries have
nothing to do with a normal "zip" file; such as the entires with bzip2 in
them - bzip2 is an alternative compressor program).
I'm fairly good with BASH, having programmed for over 3 decades, and used
BASH for about 10 years. Which is both good and bad. The good is that I
understand BASH fairly well. The bad is that I like "tricky coding" (a
personal problem).
>
> Sarah
>
>
--
There’s no obfuscated Perl contest because it’s pointless.
—Jeff Polk
Maranatha! <><
John McKown
[[alternative HTML version deleted]]
More information about the R-help
mailing list