Find the answer to your Linux question:
Results 1 to 9 of 9
I am a new member and i want to know : Which commands we use to finds out all the users who are currently logged in and prints out the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Needing youe help in Linux Commands.


    I am a new member and i want to know :

    Which commands we use to finds out all the users who are currently logged in and prints out the user name and the IP address of the terminal from where each user is logged in.

    also i want to know how to print my own username and IP address, and If there is currently no user logged in, how can i display an appropriate message.
    **************

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Try the w and who commands.

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    If you should need more info about either of those commands, you can run man w or man who in a terminal.

    Also, you can check out LinuxCommand.org for lots of good command line stuff:

    LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    oz

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    164
    this might be useful, too:
    Code:
    finger

  6. #5
    Just Joined!
    Join Date
    May 2008
    Location
    Calamba Philippines
    Posts
    2

    cp command

    Guys please help give example of cp command copying folder/folders and file/files from a source to a target.

    Plus: Why cant I copy a folder going to "/usr/local". it says i am not an owner?

  7. #6
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763

    Exclamation

    Hi usongiovanni,

    Usage of cp command. Checkout
    Code:
    man cp

    Examples:

    cp path/to/source/filename path/to/destination

    if want to copy entire directory or folder then use -r option.

    cp -r path/to/source/directory path/to/destination


    Make sure you got correct permission to copy the files.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #7
    Just Joined!
    Join Date
    May 2008
    Location
    Calamba Philippines
    Posts
    2

    Remove Folder with folders

    Thanks, that helps.

    Now i want to delete a folder with lots of child directories inside. How do i completely remove the mother directory and its child directories?

  9. #8
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,763
    Quote Originally Posted by usongiovanni View Post
    Thanks, that helps.

    Now i want to delete a folder with lots of child directories inside. How do i completely remove the mother directory and its child directories?
    use rm command
    Code:
    rm -rf path/of/directory

    checkout:
    Code:
    man rm
    and Please checkout the commands link given by ozar it has plenty of info.


    for rm command see..
    Learning the shell - Lesson 5: Manipulating Files
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  10. #9
    Just Joined!
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    1

    Lightbulb w give you more info than who

    w gives you more information
    like Terminal Type, number of users logged in , From , Load Average, Command History .
    Where as who only gives you number of user logged in , terminal and date/time

Posting Permissions

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