Find the answer to your Linux question:
Results 1 to 6 of 6
any1 tell mi wat this' * 'sign stand for??...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59

    wat does this * sign stand for??


    any1 tell mi wat this' * 'sign stand for??

  2. #2
    Linux Enthusiast
    Join Date
    Jul 2005
    Location
    Maryland
    Posts
    522
    It depends on the context.
    For example, in a directory it means (substitutes for) all (not hidden) files.
    So, if you need to copy all files from directory_A to directory_B, you can use * (asterisk, or star), instead of supplying every file name to the copy command:
    Code:
    cp directory_A/* directory_B/
    or it could mean anything in the file name before *, or after the * (depends on how you use it):
    For example, let's say you have some files in directory_A:
    Code:
    ls   directory_A
    file.txt
    file11.txt
    file1.tar.gz
    file2.tar.gz
    and you want to move only tarball files to directory_B, but not the others. In this case it's also convenient to use * (so you do not have to type full names):
    Code:
    cd directory_A
    mv *.tar.gz directory_B/
    * is also used for many other things.
    See Asterisk - Wikipedia, the free encyclopedia
    for more information.

  3. #3
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59
    wat about this sign ^ ?? u noe wat that stand for?

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    The asterisk (*), caret (^), and question mark (?) are all wildcard characters. All *nix shells can perform wildcard expansion.

    Use the asterisk wildcard if you don't wish to view any hidden files. ls * would display all files and directories in the current directory except for those beginning with a dot (hidden).

    If you wish to view only files with five-letter names beginning with a given letter, use the question mark wildcard. ls p???? will display only files with names with five letter files starting with 'p.' You can also use the square brackets for filename completion. ls [a-d]* displays all files and directories that begin with any letter between 'a' and 'd.'

    The caret wildcard excludes files. mv *[^.php] ../ would move all files to the parent directory, excluding those with .php extension.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Jul 2007
    Posts
    59
    hw does ^ works?

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by jeffrey_seeNJ
    hw does ^ works?
    did you try above mentioned example? you should search and do a few experiments yourself. thats the best way of learning IMHO.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

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