Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Interestingly enough, it works with paths but not files names (i.e. for -iname * or -name *). So you are right, I just got confused or so it seems.
Sorry for the disruption.
When you use it as -iname * (and your CURRENT DIRECTORY is not empty) shell will expand * to the list of all files in the directory, so you (most likely) get syntax error, like if you write
Code:
find ... -name a.c b.c c.o
But if no expansions happened or if multiple arguments correct from the find POV of view, it will work.
Talking about * expansions.
Some time ago I tried to move my c files to the other directory.
I intended to write
Code:
mv *.c some_dir
But by mistake typed only
Code:
mv *.c
And to my bad luck I had only two c files !
So after expansions command looked like
Code:
mv file1.c file2.c
And mv was happy to overwrite my file2.c
If I had more than two files, than command would be
Code:
[prompt]$ mv file1.c file.2 file.3c
mv: target `file3.c' is not a directory
the -name option can have wildcards in single quotes eg
-name '*.dat'
so it (*) gets interpreted by the find cmd, not the current shell
Thanks chrism01 but as I understand the OP (/home/*/upload/* and then change permissions any file in that directory) it is directories that are to be wildcarded.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.