Results 1 to 6 of 6

Thread: need some help with unix commands

  1. #1
    Junior Member kooze's Avatar
    Join Date
    May 2008
    Posts
    87

    Default need some help with unix commands

    I need help with commands that will do the following for me under UNIX

    the command that will list all two character
    files in the /usr/bin directory.

    the command that will list the files in the /usr/bin directory
    that begin with x or z.

    the command that will save the result of the who command
    to the file whoison.

    Thanks for any help

    P.S I tried fooling around with the grep command for the first two but it confused me, and I don't know if that's even the most efficient command to use for such tasks I need done, and as far as the last one I have no direction.

  2. #2
    Member
    Join Date
    Sep 2008
    Posts
    306

    Default

    the command that will list all two character
    files in the /usr/bin directory.
    ls -al | grep -o ??
    Not the best solution, but it works.
    ls -al ?? works too.
    the command that will list the files in the /usr/bin directory
    that begin with x or z.

    ls -al x* , z*

    Not the best solution, but it works.

    the command that will save the result of the who command
    to the file whoison.
    who > whoison


    Sidenote: You are not a new member , so you should know that this is not a Linux/Unix Support forum.
    Be sensitive in choosing where you ask your question. You are likely to be ignored, or written off as a loser, if you:

    * post your question to a forum where it's off topic
    * post a very elementary question to a forum where advanced technical questions are expected, or vice-versa
    * cross-post to too many different newsgroups
    * post a personal e-mail to somebody who is neither an acquaintance of yours nor personally responsible for solving your problem

  3. #3
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    Quote Originally Posted by terminal86 View Post
    Sidenote: You are not a new member , so you should know that this is not a Linux/Unix Support forum.
    No, but now we're apparently a homework support forum.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

  4. #4
    Member
    Join Date
    Sep 2008
    Posts
    306

    Default

    Quote Originally Posted by streaker69 View Post
    No, but now we're apparently a homework support forum.
    This time,i just wanted to be helpful. In general i request to ask the question to another board or google.
    Be sensitive in choosing where you ask your question. You are likely to be ignored, or written off as a loser, if you:

    * post your question to a forum where it's off topic
    * post a very elementary question to a forum where advanced technical questions are expected, or vice-versa
    * cross-post to too many different newsgroups
    * post a personal e-mail to somebody who is neither an acquaintance of yours nor personally responsible for solving your problem

  5. #5
    Junior Member kooze's Avatar
    Join Date
    May 2008
    Posts
    87

    Default

    Quote Originally Posted by terminal86 View Post
    This time,i just wanted to be helpful. In general i request to ask the question to another board or google.
    well thanks for being helpful, ill just take those types of questions respectably to another forum from now on

  6. #6
    Senior Member streaker69's Avatar
    Join Date
    Jan 2010
    Location
    Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
    Posts
    3,535

    Default

    Quote Originally Posted by kooze View Post
    well thanks for being helpful, ill just take those types of questions respectably to another forum from now on
    You don't even have to take it to a forum, I'm sure a bit of googling will turn up several sites that list Linux command line stuff.

    Plus you can always try things like 'ls --help' or 'man ls'. Almost all commands have man pages or quick help.
    A third party security audit is the IT equivalent of a colonoscopy. It's long, intrusive, very uncomfortable, and when it's done, you'll have seen things you really didn't want to see, and you'll never forget that you've had one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •