Results 1 to 6 of 6
any1 tell mi wat this' * 'sign stand for??...
- 07-12-2007 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
wat does this * sign stand for??
any1 tell mi wat this' * 'sign stand for??
- 07-12-2007 #2Linux Enthusiast
- Join Date
- Jul 2005
- Location
- Maryland
- Posts
- 521
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:
or it could mean anything in the file name before *, or after the * (depends on how you use it):Code:cp directory_A/* directory_B/
For example, let's say you have some files in directory_A:
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:ls directory_A file.txt file11.txt file1.tar.gz file2.tar.gz
* is also used for many other things.Code:cd directory_A mv *.tar.gz directory_B/
See Asterisk - Wikipedia, the free encyclopedia
for more information.
- 07-12-2007 #3Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
wat about this sign ^ ?? u noe wat that stand for?
- 07-12-2007 #4
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
- 07-13-2007 #5Just Joined!
- Join Date
- Jul 2007
- Posts
- 59
hw does ^ works?
- 07-13-2007 #6did you try above mentioned example? you should search and do a few experiments yourself. thats the best way of learning IMHO.
Originally Posted by jeffrey_seeNJ It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First


Reply With Quote
