Questions tagged [wildcards]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
49 views

How can I run (execute) many files with the same filename wild card using one command?

I am using a desktop Windows program that copies multiple Linux ASCII text job files to an AWS CloudFormation (EC2, Linux), as well as copies data to sub-folders. All of the ASCII text "job files" ...
1
vote
2answers
29 views

Filtering for a set of files that start and end with certain characters

Hi I am new to all of this so any help is appreciated!! I have a list of files that I want my bash script to work on such as BG2_45TS02.assembled.fast BG2_45TS02.riboassembled.fastq BG3_45TS02....
3
votes
2answers
283 views

find with wildcard path and export the result to a file

I need to find files that match this pattern: find root_folder/*/match_string/*.ext "*" means any levels of folders or files. So it means any file with an extention "ext" under root_folder or its ...
0
votes
2answers
659 views

Download a list of files with wget using wildcards

I have a list of files like: test.com/image01.png test.com/image02.png test.com/image03.png ... test.com/image50.png and want to download them all. One way is to write all names in a file and then: ...
1
vote
1answer
482 views

How to find and replace a string including wildcards in LibreOffice Calc?

I have a Calc spreadsheet which I copied and pasted from Wikipedia. It has a bunch of citation links in the form of "[num]". Something like "some data I want to keep [1] [12]". How do I use Find and ...
1
vote
1answer
138 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
675 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
364 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- ...
13
votes
4answers
10k 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
611 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
326 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
86 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
99 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
284 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
378 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
330 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. ...
2
votes
1answer
2k 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
63 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
4k 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
504 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 ...
7
votes
2answers
2k 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
110 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 ...
16
votes
2answers
3k 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
148 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
2k 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
32 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 ...
18
votes
2answers
12k 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 ...
4
votes
1answer
8k 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
502 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 ...
9
votes
3answers
13k 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
2k 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
100 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
288 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/...
9
votes
3answers
37k 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 ...