Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wildcards]

Wildcard patterns or glob patterns are patterns to select a collection of file names or other strings.

1
vote
1answer
43 views

How can I grep patterns only inside files with a specific file name?

I spent plenty of time searching for an existing question about my issue but I falied to find any solution for this case in specific. I apologize in advance if there is an existing thread/question ...
2
votes
1answer
52 views

Is there a way to use wild cards, redirection or other shell syntax with systemd units?

I have a systemd file to start a jar file. But I want to execute jar file as *.jar. Is there a way to do this? [Unit] Description=Test Background [Service] ExecStart=/usr/bin/java -jar /var/www/...
0
votes
0answers
42 views

mget `*.*` doesn't work

I want to download all files in a folder with ftp. But mget *.* isn't accepted. Here is the terminal output: ftp> ls 200 PORT command successful 150 Directory listing for /DCIM/Camera/ -rw-rw-rw- ...
6
votes
2answers
4k views

Citrix receiver 13.10 on Ubuntu 18.04.1

I am trying to get Citrix receiver to work on my Ubuntu laptop. I've installed the Citrix receiver, however when I try to open the .ica file that my company provides when I login to my organisation's ...
0
votes
1answer
210 views

installing a wildcard Certificate on a subdomain running on ubuntu

i have tried for a full day in vain to install a wildcard Certificate on owncloud (which is a subdomain and running on obuntu 16.04 with apache2) Any one who can help me here with concrete steps? ...
1
vote
1answer
152 views

Rsync Exclude MP4's Using Wild Cards For Paths

I am wanting to exclude rendered videos (.mp4) from my rsync backups. However there are some .mp4's I need included in the backup. The difference is the path where the MP4's to be excluded are ...
1
vote
2answers
40 views

wildcards on executables (binaries)

I can use wildcards to select certain types of files by their extensions, e.g. mv *.cc src/ How to select executables that don't have an extension?
-1
votes
3answers
93 views

How to store a filename currently *.jpg reading in command rm *.jpg? [closed]

I want to use the filename currently used by *. How to get the name of the file?
0
votes
1answer
117 views

“globstar” equivalent in dash (Debian Almquist Shell)

I am using /bin/dash on a project, but I have need for **/filename.ext to have recursive behavior (i.e. globstar enabled in bash). Is globstar available in dash? Is there a similar feature or ...
0
votes
0answers
28 views

Why is this wildcard not working in bash? [duplicate]

I have an alias set up alias nano="nano -B" so everytime I change a <configFile>, a backup <configFile>~ is generated. Now I have a lot of those backups I don't need anymore so I tried ...
4
votes
2answers
1k views

Asterisk not working with grep

I searched for ki with * as per the example below and it should have returned the first three lines. I am not sure why it returns the last line when there is no ki matching it. $ grep "ki*" ...
4
votes
1answer
261 views

How does a command (i.e. grep) know when it is run as part of glob expansion?

As per my understanding, a glob wildcard is interpreted by the shell, which then runs the given command for each matching filename. Suppose I have files: abc1, abc2, and abc3 in my current directory. ...
1
vote
1answer
1k views

Grep exclude wildcards not working

I am using Ubuntu 14.04 LTS. I am playing around with grep and I hit an issue piping grep to ls. All examples are limited to a current directory, non-recursive. If I want to list all files ...
1
vote
1answer
61 views

couldn't understand output of grep with regular expression while using pipe

As far as I know, while using regex with grep single quotes should be used otherwise the shell interpretet it as glob(wildcard) characters and performs a filename expansion, but in the below example, ...
22
votes
3answers
2k views

How should I glob for all hidden files?

I want to carry out some action (say chown) on all the hidden files in a directory. I know that this .* is not a good idea because it will also find the current . and parent .. directories (I know ...
12
votes
1answer
2k views

Is globbing a feature of the shell?

I read many questions and answers like this and this one I know wildcards are expanded by the shell before running a command and they are a feature of the shell. Also wildcards work with those ...
4
votes
1answer
438 views

How to show a difference between the usage of '*' , '+' and '?' in grep? [duplicate]

I understand that '*' : The preceding item will be matched zero or more times. '?' : The preceding item is optional and will be matched, at most, once. '+' : The preceding item will be matched one or ...
6
votes
2answers
854 views

What is the wildcard specifying one or two characters?

Is there a simpler way to write: wc -l foo?.txt foo??.txt ? Since in my case I have (at most) two digit numbers, I tried using the range specification wc -l foo[1-99].txt but this ended up displaying ...
2
votes
1answer
80 views

Is it possible to use wildcards with Geeqie?

For a long time I have been using Gthumb as my image viewer of choice, since it's fast and allows me to use wildcards. Since the last update though (version 3.4.3) the display of low resolution ...
0
votes
0answers
82 views

Can't convert *.flac to mp3; “no such file or directory” [duplicate]

I am trying to follow this previous question and this associated wiki page to convert flacs to mp3s with a bash script. I have tried it with avconv and ffmpeg, with *.flac and ./*.flac, and I keep ...
11
votes
2answers
2k views

Can anyone explain why sudo ls with a wildcard doesn't work?

$ sudo -iu abc ls -ltr /sites/servers/server_instance/logs/access* ls: cannot access /sites/servers/server_instance/logs/access*: No such file or directory $ sudo -iu abc ls -ltr /sites/servers/...
-6
votes
4answers
140 views

How do I list files which have a “s” as first and a “l” as last char with a shell-command?

I'm trying to list files that start with "s" and with "l". The command I'm trying is ls -l *sfa*
1
vote
2answers
1k views

Problem with using wildcards when I do CP command in Terminal

I am new and try to learning Terminal Command. Today I faced some problem with cp wildcard command option. I wrote in Terminal this command cp Downloads/[:alnum:] test/ Here, Downloads is the ...
0
votes
1answer
27 views

How do I move a whole album to a directory using middle characters?

im familiar with wildcards and ?, but what I want to do is move albums into their appropriate directories using the "(Disc X)" located in the middle of the file. So, I've switched to the directory of ...
11
votes
2answers
9k views

Regular expressions VS Filename globbing

I know that Regular expressions are to be used only with characters and strings, but sometimes I find them in the names of files. My question is: are regexes only used with characters or also with ...
2
votes
1answer
5k views

How to delete this files with wildcards in ubuntu terminal

Just asking how to delete these files (below is a sample). I tried rm -rf '*.upload'. but they are not deleted. Please help. thanks for sharing! sample -4776d77b-15138be20a5--7fe5564294743529948392....
1
vote
1answer
313 views

How to delete all files that contains “ (2)” wildcards dont work

I would like to delete all files that contains " (2)" --whitout the quotes-- in the file names. I tried first with ls to test ls *(2)* and list all the files in the folder ls "*(2)*" don't list ...
7
votes
3answers
9k views

7zip: How to exclude file types?

I want to exclude the following file types: epub pdf html (upper case too) azw3 mobi opf txt I have this so far which doesn't seem to work, i get an error saying "Incorrect Command Line". 7z e "-x!...
1
vote
2answers
1k views

Does wget or any other http file downloader on Ubuntu support wild cards?

I would like to be able to write a bash script to automatically update my MediaWiki extensions and I think I will use this website https://extdist.wmflabs.org/dist/extensions/ to do so. But as you can ...
1
vote
3answers
1k views

move all files except with extension [duplicate]

I have moved a tar.bz2 from my Downloads to /usr/src, which is where I like to put all things that I install on my system. Now I extracted the file and I want to move its contents to /usr/share/icons. ...
2
votes
1answer
96 views

Why does 'echo *' give different results than 'ls *'?

For example, if you are in home directory and type ls *, you will have all the directories listed, and below the name of the listed directory, the files that it contains. On the other hand, if you ...
2
votes
1answer
1k 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 ...
1
vote
3answers
231 views

Wildcard: return source path

I'm trying to rename every access.log.gz file (note: exact filename, not "beginning with" or "containing") found in /home/*/logs to date-access.log.gz in the same folder. for file in /home/*/logs/...
8
votes
3answers
27k views

How to pass '*' wildcard to path parameter of find command via a variable in script?

I want to use find to find files in a set of folders restricted by wildcards, but where there are spaces in the path name. From the command line, this is easy. The following examples all work. find ...