Cat Command

Lord Sauron lordsauronthegreat at gmail.com
Wed Mar 15 05:11:16 GMT 2006


On 3/14/06, Mike Hudson <mike.hudson at gmail.com> wrote:
> Howdy,
>
> On Mar 14, 2006, at 6:41 PM, Lord Sauron wrote:
>
> > Back in the /dev/null discussion there was some talk of the "cat"
> > command (or something like that).  What's that?
>
> cat is short for conCATenate.  It's basically a way to say "read this
> file, and spit the contents into standard output.

Like the . operator in PHP.  Cool.

> One way to copy a file would be: "cat file1.txt > file2.txt"
>
> Also, since most programs will handle a stream from another program
> as input, you could cat a file into grep instead of telling grep to
> search through a file.
>
> Example:
>         cat file1.txt |grep -i string
>
> I have heard that you can "cat" an uncompressed sound file into your
> audio device in /dev/... to have it play the sound to your speakers,
> though I've never tried.  I think the device expects AIFF, not WAV,
> but I am not certain.
>
> I'm sure there's an example that would actually save you time, but I
> can't think of one at the moment.
>
> Probably the most valuable linux tip anyone can give you is: the
> "man" system is your friend.  Any time you see a command and you
> don't know what it does, you can try typing "man command" into the
> terminal to find out.  It's very rare that there's no man page for a
> command.  There are even man pages for configuration files, which are
> extremely informative.
>
> You can also type "man command" into google and a man page will be
> one of the first results.  Be careful, though, as sometimes the
> command you're using will differ from the one posted online.  For
> best results, run man from the command prompt of the system you're
> working on.
>
> I hope this helps!
>
> Best Regards,
> Michael Hudson
>
>
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>


--
========== GCv3.12 ==========
GCS d-(++) s+: a? C++ UL+>++++ P+
L++ E--- W+(+++) N++ o? K? w--- O? M+
V? PS- PE+ Y-(--) PGP- t+++ 5? X R tv-- b+
                DI+++ D+ G e* h- !r !y
========= END GCv3.12 ========



More information about the kubuntu-users mailing list