Globbing means matching files by name patterns containing wildcards.

learn more… | top users | synonyms (2)

0
votes
3answers
593 views

Number of files in a directory starting with specific text

How to get count of files in a directory starting with specific text like dataxxx.csv
0
votes
2answers
90 views

For loop cannot distinguish * syntax

set -x for f in ~/1/2/*/*_1.txt; do subdir="${f%/*}" pushd "$subdir" &>/dev/null file="${f##*/}" expTool INPUT1= "${f##*/}" INPUT2= "${f%_1.txt}_2.txt OUTPUT1= "${f%_1.txt}_3.txt" OUTPUT2= "${...
0
votes
2answers
35 views

How to exclude the files with all the 4-digit numbers without the first five numbers by wild card in tree command

I want to exclude list the following number 0005 0006 ... 9998 9999 I try the following code, but failed And I use tree -I '*.[0-9][0-9][0-9][5-9]' But It creates line with 0014 0024... I ...
4
votes
1answer
70 views

What is the sort order when using conditional operators?

I wrote a bash script that processes a list of filenames (using glob expansion, as in for f in *) and then outputs a subset of this list to a file. Subsequently I read the content of this file into an ...
1
vote
1answer
414 views

Wildcards in exclude-filelist for duplicity

I am trying to exclude a "bulk" folder in each home directory from the backup. For this purpose, I have a line - /data/home/*/bulk in my exclude-filelist file. However, this doesn't seem to be ...
0
votes
1answer
42 views

Head and Tail of a directory, set by the user

I have this script that will show the user the head or tail of the files that are inside a set directory (currently that is set as '~/bin/new/*'). This script works but i would like to allow the user ...
0
votes
1answer
57 views

updatedb.conf, Ignore files using pattern match/globbing

Running locate command with a file name returns multiple entries as, a.py a.pyc a.py~ Obviously, i am not looking for binaries/compiled files. I tried to configure locate command to ignore files ...
0
votes
1answer
27 views

how to find the files in a directory with Prefix__date_030000_1.txt?

how to find the files in a directory with Prefix__date_030000_Suffix here Prefix is the Actual file name and format of the date is date +%Y%m%d and Suffix is the '.txt' and the 030000 number will ...
0
votes
1answer
319 views

defining rename command scope; replace word; replace entire file name; wildcards

Im looking to use the rename command to edit file names. More specifically, Im trying to isolate specific pieces to change, or in some cases, the whole name. For example: Lets say I have three ...
-1
votes
1answer
45 views

wildcard usage for a directory displaying filenames in linux?

so one of the questions i have been working on is to display the contents of a directory files by using its wildcards do display specific contents, in this case aim using ls and the portion that I got ...
1
vote
0answers
21 views

Ordering of files opened by program

When I open a set of files, usually just by using a glob character to open all the files in a directory or a subset, typically if not always the default is for the files to be opened by alphabetical ...
1
vote
0answers
159 views

What is the meaning of the string **/* when used with grep?

I came across this picture (below), obviously it is a pun or some kind of allusion incorporating command-line expressions. Frankly speaking I do not understand anything of it except for grep -n. ...
1
vote
0answers
46 views

optimisation of bash globs

Looking for a guide to optimising regexp matches in bash. I have a script that loops over a very long list of URLs looking for patterns. Currently it looks a little like the fragment below. Is there ...
0
votes
0answers
23 views

Unrar specific files using wildcards

I want to extract only a specific file type using unrar. With unzip command I can extract all archives with a specific extension. unzip "$FileName" *[.txt,.TXT] How can I do the same with unrar? ...
0
votes
0answers
218 views

rsync “no such file or directory” when using wildcard

I am trying to use rsync to copy the contents of a folder to another folder. This is the command I am using for this. rsync -v -r $folder64/Pictures/* $folder65/Pictures/ And here is the error code....
0
votes
0answers
126 views

how to exclude specific subfolder when creating zip file via command line linux

I do want to exclude subfolder like uploads/2015/OtherSubfolderName through command line. I have tried with below command, its working fine. zip -r zipfile.zip public_html -x *uploads* but can we ...