Tuesday, March 24, 2009

More fun linux tidbits

I don't remember this wildcard syntax ever.


To solve this problem, you can take advantage of Linux' built-in wild card support. This support, also called "globbing" (for historical reasons), allows you to specify multiple files at once by using a wildcat pattern. Bash and other Linux commands will interpret this pattern by looking on disk and finding any files that match it. So, if you had files file1 through file8 in the current working directory, you could remove these files by typing:

Code Listing 5.2: Removing files using shell completion

$ rm file[1-8]

0 Comments:

Post a Comment

<< Home