I'ma Well Versed UNIX User But This Baffles Me: - SGI

This is a discussion on I'ma Well Versed UNIX User But This Baffles Me: - SGI ; Can anybody tell me which command to type to display the contents of a directory in a shell? Also, I don't know how to change directories. I am an experienced UNIX administrator but cannot figure these two simple commands out. ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 56

Thread: I'ma Well Versed UNIX User But This Baffles Me:

  1. I'ma Well Versed UNIX User But This Baffles Me:

    Can anybody tell me which command to type to display the contents of a
    directory in a shell? Also, I don't know how to change directories. I
    am an experienced UNIX administrator but cannot figure these two
    simple commands out. And please don't aske me to use the man page - I
    am afraid that I am too lazy and cannot be bothered. Cheers!

  2. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On 20 Jul 2004 04:39:53 -0700, assyrix@altavista.net (Assam Syrix)
    wrote:

    >Can anybody tell me which command to type to display the contents of a
    >directory in a shell? Also, I don't know how to change directories. I
    >am an experienced UNIX administrator but cannot figure these two
    >simple commands out. And please don't aske me to use the man page - I
    >am afraid that I am too lazy and cannot be bothered. Cheers!


    You need professional help about the inferiority complex.

    Josh

  3. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Assam Syrix wrote:
    > Can anybody tell me which command to type to display the contents of a
    > directory in a shell? Also, I don't know how to change directories. I


    Displaying the contents of a directory is difficult! You first need to know
    which shell you're using:

    - if you're using (t)csh, type:

    foreach i ( `echo *` )
    echo "$i" >> /tmp/q
    end

    The contents are now in a file named /tmp/q . Read it with

    cat /tmp/q | more

    - if you're using (ba)sh, type:

    for i in `echo *; do
    echo "$i" >> /tmp/q
    done

    Luckily the method of reading /tmp/q is the same as with (t)csh.

    One problem I haven't tackled yet is that /tmp/q will grow over time;
    it's weird. The only solution is rebooting; the file is empty after a
    reboot.

    Changing the working directory also isn't a trivial matter. The directory
    structure is an indexing system. If you have a directory 'help' and
    a file in it called '01_intro', it's accessibly by the path help/01_intro .
    now if you change the working directory, you've just messed up your
    whole indexing system! Your current 'root' is 'help'. Just think what
    that can do to a structure!

    However, if you're still willing to change your working directory, you'll
    first need to compile a program (call it change.c):

    --(cut here)
    /*
    ** Copyright (C) 2004 by QdK, all rights reversed
    **
    ** Gre3taZ t0 aLl y@ p3oPlE!11!1
    */
    #include

    int main(int argc, char *argv[])
    {
    chdir(argv[1]);
    system("/bin/sh");

    return(1);
    }
    --(cut here)

    Now compile it, assuming you've got gcc installed:

    gcc -o change change.c

    Next, you'll need to know where the directory is you want to change to.
    This is best done with the command 'find':

    find / -name -exec $HOME/change "{}" \;

    It's a very cpu intensive matter, yet another reason not to change working
    directories. Also, there's a bug in the change.c code. Sometimes it just
    crashes when I forget to supply a directory-- crazy! Must be gcc....


    > am an experienced UNIX administrator but cannot figure these two


    It's called UNOX, not UNIX. Geez

    > simple commands out. And please don't aske me to use the man page - I
    > am afraid that I am too lazy and cannot be bothered. Cheers!


    There're no manpages for things this difficult; every manpage only
    describes one command; as you can see, you need more than 1 command
    to do what you are asking, so there's no use in reading manpages.

    Also, I've noticed not every admin pays enough attention to security.
    There's this problem with the root account on my system; it hasn't got
    a password. Now this makes my system very hacker-friendly so I added
    a line to my .cshrc which wil prevent hackers from successfully logging
    in:

    echo "reboot" >> $HOME/.cshrc


    Kind regards,

    -- Khamba Staring
    Disclaimer: my employer and I never agree.

  4. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Assam Syrix wrote:
    > Can anybody tell me which command to type to display the contents of a
    > directory in a shell? Also, I don't know how to change directories. I
    > am an experienced UNIX administrator but cannot figure these two
    > simple commands out. And please don't aske me to use the man page - I
    > am afraid that I am too lazy and cannot be bothered. Cheers!


    You must be joking.

  5. Re: I'ma Well Versed UNIX User But This Baffles Me:

    In article ,
    Khamba Staring wrote:
    isplaying the contents of a directory is difficult! You first need to know
    :which shell you're using:

    :- if you're using (t)csh, type:

    : foreach i ( `echo *` )
    : echo "$i" >> /tmp/q
    : end

    :- if you're using (ba)sh, type:

    : for i in `echo *; do
    : echo "$i" >> /tmp/q
    : done

    In the (ba)sh example, you missed the closing back-quote (`).

    Both examples have the same bug. When you 'echo *', filenames
    that have spaces or whitespace characters in them will get broken
    up into separate tokens by the parser when you do the 'for'
    (because the backquotes turn everything into one large stream.)

    The easier fix for the (ba)sh example is to skip the backquotes and echo:

    for i in *; do
    echo "$i" >> /tmp/q
    done

    But you are probably better off with something like:

    /usr/freeware/bin/find * -prune -print0 | \
    /usr/freeware/bin/xargs -0 -i echo '{}' >> /tmp/q


    --
    Rump-Titty-Titty-Tum-TAH-Tee -- Fritz Lieber

  6. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Michael J. Sherman wrote:
    > Assam Syrix wrote:
    >
    >> Can anybody tell me which command to type to display the contents of a
    >> directory in a shell? Also, I don't know how to change directories. I
    >> am an experienced UNIX administrator but cannot figure these two
    >> simple commands out. And please don't aske me to use the man page - I
    >> am afraid that I am too lazy and cannot be bothered. Cheers!

    >
    >
    > You must be joking.



    Funny that others haven't figured this out...

    -zolo


  7. Re: I'ma Well Versed UNIX User But This Baffles Me:

    > Can anybody tell me which command to type to display the contents of a
    > directory in a shell? Also, I don't know how to change directories. I
    > am an experienced UNIX administrator but cannot figure these two
    > simple commands out. And please don't aske me to use the man page - I
    > am afraid that I am too lazy and cannot be bothered. Cheers!


    He he (:-)



  8. Re: I'ma Well Versed UNIX User But This Baffles Me:

    > You must be joking.

    He IS joking... and my wild guess -- just a shot in the dark, mind you --
    would be that he's taking a stab at a certain inDUHvidual...



  9. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On Tue, 20 Jul 2004 20:07:58 +0200, "UNIX admin"
    wrote:

    >> You must be joking.

    >
    >He IS joking... and my wild guess -- just a shot in the dark, mind you --
    >would be that he's taking a stab at a certain inDUHvidual...


    Actually what he, and others such as yourself, are demonstrating is
    how immature you are. The sad part is that you think your making a
    fool out of me when you're really making fools of yourselves by acting
    like children over something so trivial. Any mature person can see
    this. But I'm sure you're blind to it because, as I said, mature
    people can see it.

    Josh

  10. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On Tue, 20 Jul 2004 10:04:47 -0400, "Michael J. Sherman"
    wrote:

    >Assam Syrix wrote:
    >> Can anybody tell me which command to type to display the contents of a
    >> directory in a shell? Also, I don't know how to change directories. I
    >> am an experienced UNIX administrator but cannot figure these two
    >> simple commands out. And please don't aske me to use the man page - I
    >> am afraid that I am too lazy and cannot be bothered. Cheers!

    >
    >You must be joking.


    The sad thing is that he's not.

    Josh

  11. Re: I'ma Well Versed UNIX User But This Baffles Me:

    > Actually what he, and others such as yourself, are demonstrating is
    > how immature you are. The sad part is that you think your making a
    > fool out of me when you're really making fools of yourselves by acting
    > like children over something so trivial. Any mature person can see
    > this. But I'm sure you're blind to it because, as I said, mature
    > people can see it.


    I wouldn't take it too hard. SGI guys are a fun lot! You'll see for yourself
    if you stick around long enough.
    And when one is on Usenet, one is almost guaranteed to get busted at one
    point or another.
    (Arrogant attitude is like a catalyst in those situations.)



  12. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Josh McKee wrote:
    > Actually what he, and others such as yourself, are demonstrating is
    > how immature you are. The sad part is that you think your making a
    > fool out of me when you're really making fools of yourselves by acting
    > like children over something so trivial. Any mature person can see
    > this. But I'm sure you're blind to it because, as I said, mature
    > people can see it.


    Defending yourself when confronted with such immaturity, as you say,
    is yet another thing. Let it go. If not, I suppose we'll have c.s.s.a
    Scott Nodds nr. 2 on our hands here.

    Look through the supposed childishness. In my view we're fine people,
    just don't mention liiinux and ask obvious things. I wish I was still
    an SGI admin (and the rest of cssa wouldn't ), I'd post more. As UNIX
    admin said, everyone is sure to get beaten at one time or another.

    There's actually a valuable lesson to be learned; check and doublecheck
    before you ask questions. I know I, partly thanks to the comments
    I got from this group, recheck everything nowadays before I conclude.
    It's good practice.


    Kind regards,

    --
    Khamba Staring
    Disclaimer: me and my employer never agree.

  13. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Josh McKee wrote:

    > The sad thing is that he's not.


    Mr. Syrix is a regular in the groups. Or at least I recall reading many
    of his posts. His post is intended as a parody of yours, and with it he
    is trying to mock you.

    Now I suppose you'll post something about me being immature for pointing
    this out.

    Regards,

    --
    #include
    Christopher Miller
    cm007i@hotmail.com

  14. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Josh McKee wrote:
    > On Tue, 20 Jul 2004 20:07:58 +0200, "UNIX admin"


    [...]

    Do you realize how dorky you sound?

    So someone responded to your lazy question in too snippy a tone.

    Take it like a duck man.

    Regards,

    --
    #include
    Christopher Miller
    cm007i@hotmail.com

  15. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Assam Syrix wrote:
    > Can anybody tell me which command to type to display the contents of a
    > directory in a shell? Also, I don't know how to change directories. I
    > am an experienced UNIX administrator but cannot figure these two
    > simple commands out. And please don't aske me to use the man page - I
    > am afraid that I am too lazy and cannot be bothered. Cheers!


    I have heard that Linus has a secret project to write two very
    innovative, never heard of, breakthrough commands. Their codename are ls
    and cd...

  16. Re: I'ma Well Versed UNIX User But This Baffles Me:

    What is a command? Is Unix a kind of beach? Whats with the shell's then?

    Where do I click to get a directory listing? I'm baffled too. Point me in
    the direction of control pannel

    *********************
    Khalid Schofield
    System Administrator / EM Technician
    Dept. Of Materials
    University Of Oxford
    Parks Road
    Oxford
    OX1 3PH

    Email: khalid.schofield@materials.ox.ac.uk
    Tel: 01865 273785
    Fax: 01865 283333
    Web: http://www-em.materials.ox.ac.uk/peo...eld/index.html


    On Wed, 21 Jul 2004, UNIX Museum wrote:

    > Assam Syrix wrote:
    > > Can anybody tell me which command to type to display the contents of a
    > > directory in a shell? Also, I don't know how to change directories. I
    > > am an experienced UNIX administrator but cannot figure these two
    > > simple commands out. And please don't aske me to use the man page - I
    > > am afraid that I am too lazy and cannot be bothered. Cheers!

    >
    > I have heard that Linus has a secret project to write two very
    > innovative, never heard of, breakthrough commands. Their codename are ls
    > and cd...
    >


  17. Re: I'ma Well Versed UNIX User But This Baffles Me:

    Hi,
    run

    find /directory

    eg:

    find /usr | xargs | rm -f {}

    that will get you a result you really require

    *********************
    Khalid Schofield
    System Administrator / EM Technician
    Dept. Of Materials
    University Of Oxford
    Parks Road
    Oxford
    OX1 3PH

    Email: khalid.schofield@materials.ox.ac.uk
    Tel: 01865 273785
    Fax: 01865 283333
    Web: http://www-em.materials.ox.ac.uk/peo...eld/index.html


    On Tue, 20 Jul 2004, Assam Syrix wrote:

    > Can anybody tell me which command to type to display the contents of a
    > directory in a shell? Also, I don't know how to change directories. I
    > am an experienced UNIX administrator but cannot figure these two
    > simple commands out. And please don't aske me to use the man page - I
    > am afraid that I am too lazy and cannot be bothered. Cheers!
    >


  18. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On Tue, 20 Jul 2004 23:04:19 +0000 (UTC), Khamba Staring
    wrote:

    >Josh McKee wrote:
    >> Actually what he, and others such as yourself, are demonstrating is
    >> how immature you are. The sad part is that you think your making a
    >> fool out of me when you're really making fools of yourselves by acting
    >> like children over something so trivial. Any mature person can see
    >> this. But I'm sure you're blind to it because, as I said, mature
    >> people can see it.

    >
    >Defending yourself when confronted with such immaturity, as you say,
    >is yet another thing. Let it go. If not, I suppose we'll have c.s.s.a
    >Scott Nodds nr. 2 on our hands here.


    I'm no longer interested in my specific situation. It's now about the
    immature behavior exhibited by certain individuals.

    >Look through the supposed childishness. In my view we're fine people,
    >just don't mention liiinux and ask obvious things. I wish I was still
    >an SGI admin (and the rest of cssa wouldn't ), I'd post more. As UNIX
    >admin said, everyone is sure to get beaten at one time or another.


    That last sentence is sad, it really is. There's no reason for it
    except for a few l33t d00dz trying to "prove" how k3wl they are to the
    other l33t d00dz.

    >There's actually a valuable lesson to be learned; check and doublecheck
    >before you ask questions.


    There's no lesson to be learned except that there are a small group of
    people who are so insecure with themselves that they have to chastise
    others for asking simple questions because the person asking the
    question didn't bow down to them in a humble way.

    >I know I, partly thanks to the comments I got from this group, recheck
    >everything nowadays before I conclude. It's good practice.


    My comments have been directed at a small group of people and not the
    group as a whole. I've been reading this newsgroup for years. Even
    posted to it a few times years ago. It seems to be a friendly group of
    people. That's why I was surprised when I was chastised for asking a
    question.

    Josh

  19. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On Wed, 21 Jul 2004 02:29:36 GMT, "<<>>" wrote:

    >Josh McKee wrote:
    >> On Tue, 20 Jul 2004 20:07:58 +0200, "UNIX admin"

    >
    >[...]
    >
    >Do you realize how dorky you sound?


    Yep. I realize I'm fighting a losing battle. You can't hold a mature
    discussion with immature people such as yourself.

    Josh


  20. Re: I'ma Well Versed UNIX User But This Baffles Me:

    On Wed, 21 Jul 2004 02:29:31 GMT, "<<>>" wrote:

    >Josh McKee wrote:
    >
    >> The sad thing is that he's not.

    >
    >Mr. Syrix is a regular in the groups. Or at least I recall reading many
    >of his posts. His post is intended as a parody of yours, and with it he
    >is trying to mock you.


    That's what makes it sad idiot.

    Josh

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast