home | login | register | DMCA | contacts | help |      
mobile | donate | ВЕСЕЛКА

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


my bookshelf | genres | recommend | rating of books | rating of authors | reviews | new | форум | collections | читалки | авторам | add
fantasy
space fantasy
fantasy is horrors
heroic
prose
  military
  child
  russian
detective
  action
  child
  ironical
  historical
  political
western
adventure
adventure (child)
child's stories
love
religion
antique
Scientific literature
biography
business
home pets
animals
art
history
computers
linguistics
mathematics
religion
home_garden
sport
technique
publicism
philosophy
chemistry
close

Loading...


4.3.2.1. Matching filenames

Linux shells use a process called globbing to find matches for ambiguous filenames before commands are executed. Consider this command:

$ ls /etc/*release*


When the user presses Enter, the shell converts /etc/*release* into a list of matching filenames before it executes the command. The command effectively becomes:

$ ls /etc/fedora-release /etc/lsb-release /etc/redhat-release



This is different from some other platforms, where the application itself is responsible for filename expansion. The use of shell globbing simplifies the design of software, but it can cause unexpected side effects when an argument is not intended to be a filename. For example, the echo command is used to display messages:

$ echo This is a test.

This is a test.


However, if you add stars to either side of the message, then globbing will kick in and expand those stars to a list of all files in the current directory:

$ echo *** This is a test. ***

bin boot dev etc home lib lost+found media misc mnt net opt proc ptal root sbin selinux srv sys tftpboot tmp usr var This is a test. bin boot dev etc home lib lost+found media misc mnt net opt proc ptal root sbin selinux srv sys tftpboot tmp usr var


The solution is to quote the argument to prevent globbing:

$ echo "*** This is a test. ***"

*** This is a test. ***


4.3.1.15. Managing files graphically with KDE | Fedora Linux | 4.3.2.2. The merged file hierarchy







Loading...