Php developers,Php Tutorials ,Web development, Web Developers, Php hosting, open-source,community
 
Serving the LAMP developers all over the word
LampDevelopers is a pure LAMP Developers community
Php developers,Php Tutorials ,Web development, Web Developers, Php hosting, open-source,community
LAMP Developers
   
   
   
   
   
   
Web Development
   
Developer / Programmer
   
Related Links
   
Member
   
Enter Keyword
Wildcard

A key feature of most Linux shells is the ability to refer to more than one file by name using special characters. These wildcards let you refer to, say, all file names that contain the character `` n ''.

The wildcard `` * '' specifies any character or string of characters in a file name. When you use the character `` * '' in a file name, the shell replaces it with all possible substitutions from file names in the directory you're referencing.

Here's a quick example. Suppose that Larry has the files frog , joe , and stuff in his current directory.

To specify all files containing the letter ``o'' in the filename, use the command

As you can see, each instance of `` * '' is replaced with all substitutions that match the wildcard from filenames in the current directory.

The use of `` * '' by itself simply matches all filenames, because all characters match the wildcard.

Here are a few more examples:

The process of changing a `` * '' into a series of filenames is called wildcard expansion and is done by the shell. This is important: an individual command, such as ls , never sees the `` * '' in its list of parameters. The shell expands the wildcard to include all filenames that match. So, the command

is expanded by the shell to

One important note about the `` * '' wildcard: it does not match file names that begin with a single period (`` . ''). These files are treated as hidden files--while they are not really hidden, they don't show up on normal ls listings and aren't touched by the use of the `` * '' wildcard.

Here's an example. We mentioned earlier that each directory contains two special entries: `` . '' refers to the current directory, and `` .. '' refers to the parent directory. However, when you use ls , these two entries don't show up.


The listing contains the two special entries, `` . '' and `` .. '', as well as two other ``hidden'' files-- .bash_profile and .bashrc . These two files are startup files used by bash when larry logs in. They are described starting on page  .

Note that when you use the `` * '' wildcard, none of the filenames beginning with `` . '' are displayed.

This is a safety feature: if the `` * '' wildcard matched filenames beginning with `` . '', it would also match the directory names `` . '' and `` .. ''. This can be dangerous when using certain commands.

 Another wildcard is `` ? ''. The `` ? '' wildcard expands to only a single character. Thus, `` ls ? '' displays all one-character filenames. And `` ls termca? '' would display    `` termcap '' but not `` termcap.backup ''. Here's another example:

As you can see, wildcards lets you specify many files at one time. we said that the cp and mv commands actually can copy or move more than one file at a time. For example,

copies all filenames in /etc beginning with `` s '' to the directory /home/larry . The format of the cp command is really

where files lists the filenames to copy, and destination is the destination file or directory. mv has an identical syntax.

If you are copying or moving more than one file, the destination must be a directory. You can only copy or move a single file to another file.

News
this is the news
this is the news this is the news this is the news....
openWYSIWYG 1.01 bet....
small description
Links