cat command with no argument - Redhat

This is a discussion on cat command with no argument - Redhat ; hi i typed the "cat" commad with no argument and the system kind of hang, i cldnt get out of it untill i rebooted the system, pls cld anyone tell me wat i shld have done instead? thnx...

+ Reply to Thread
Results 1 to 4 of 4

Thread: cat command with no argument

  1. cat command with no argument

    hi
    i typed the "cat" commad with no argument and the system kind of hang, i
    cldnt get out of it untill i rebooted the system, pls cld anyone tell me wat
    i shld have done instead? thnx



  2. Re: cat command with no argument

    On Wed, 17 Aug 2005 22:40:48 GMT, Sunusi Ringim wrote:
    > hi
    > i typed the "cat" commad with no argument and the system kind of hang, i
    > cldnt get out of it untill i rebooted the system, pls cld anyone tell me wat
    > i shld have done instead? thnx


    Control y or Control c can sometimes abort processes.
    A Control d would terminate the cat command. Here try this:

    cat > junk.txt
    whatever
    ^d <==== that is a control d

    cat junk.txt

  3. Re: cat command with no argument

    "Sunusi Ringim" writes:

    >hi
    > i typed the "cat" commad with no argument and the system kind of hang, i
    >cldnt get out of it untill i rebooted the system, pls cld anyone tell me wat
    >i shld have done instead? thnx


    man cat
    cat without an argument waits for input from stdin and put it out to
    stdout.
    You should have eitehr typed ^D or ^C (the former is end of file, and the
    latter kills the command)
    Alternatively type alt-ctrl-F2, log in and do
    killall cat
    then get back to your console with
    alt-ctrl-F1
    (I assume you are in console mode, not X, or you could simply have opened a
    new terminal and typed the killall command)



  4. Re: cat command with no argument

    .... after inserting a credit, Sunusi Ringim
    leaned forward and saw...
    >hi
    > i typed the "cat" commad with no argument and the system kind of hang, i
    >cldnt get out of it untill i rebooted the system, pls cld anyone tell me wat
    >i shld have done instead? thnx
    >

    CTRL-C to break out of the command
    CTRL-D would have told "cat" that you've finished typing.

    nb: it's not a good idea to type in commands to see what they do, if
    that's what you were looking at doing. Instead, pass them a "-?" option
    to force help, eg:

    cat -?
    ls -?
    shutdown -?

    That kinda thing. Alternatively, use "man cat" to bring up the manual
    page on the "cat" command.
    --
    "There's a girl in a green dress,
    she's got eyes like fire and lips so tame.
    She's huddled by the girl who's crying in the red dress
    Hunger for life in this dying age."

+ Reply to Thread