I'm by no means an expert on the topic, however it has occured to me that
will not work
because the bash interpreter will decode this as "look for all files that have an extention whose patters is : <any combination >test.
what I'm trying to say is the dot (.) is interpreted here as the extension delimiter. It is not interpreted as "files that are hidden".
I tested ls -la .*test on gentoo linux and it definitely does not return the hidden file called "test".
In my own simplistic way, because I'm not a pro, I worked out the following solution (I'm certain there are better):
I realise it's listing EVERYTHING and only grabbing whatever has the pattern "test" in it, and this may or may not be what you want, however that's what I was able to summon with my limited knowledge and free time.
Please, I invite you to refine my search.
Last edited by Scrutinizer; 04-14-2012 at 05:50 PM..
Reason: lingo, code tags
@alfonsopilato. Hi, there is not such thing as an extension on Unix. So humans may call it that way, but for the system it is a file with a dot somewhere in the name (a dot at the beginning does have a special meaning of course as it designates a hidden file etc).
Last edited by Scrutinizer; 04-14-2012 at 06:28 PM..
This User Gave Thanks to Scrutinizer For This Post:
@Scrutinizer, thank you. I have tried ls -l .*test and that works for me now.
Was it the "touch .test " that may have kicked it in?
I have reviewd my command history and reran the command that previously had failed.. it's now working.
Thanks again for clarifying this. I do very much appreciate it.
Hi alfonsopilato, welcome to the Unix and Linux forums!
The touch had nothing to do with it, that is just a way to create zero length file if it does not already exist.
This User Gave Thanks to Scrutinizer For This Post:
After reading the manual of the command rename I would like to apply it to a folder with a couple of files containing old style dots before the file-type, e.g. up.to.the.roof.avi. So I'd like to rename them without the dots in between. Therefore I tried it the following way
rename -f -n ... (4 Replies)
Dear All,
How to remove. (dot) if found in the beginning of file name while doing wget (download)?
I am facing problem while re-sizing the image by using ImageMagick. Two dots in the file name are causing problem. ImageMagick is skipping such image with a dot . in the beginning, like
... (1 Reply)
Hi,
I tried to grep ".sh_history" (DOTsh_history) file and did not return anything though I found the word in .sh _history file through vi editor in Linux. Then I tried to grep ".profile" to check if it is the prob with hidden files and I got results.
Then I verified the same with my friend... (4 Replies)
I need a script that will allow me to rename all of my files in subdir /FilesIn
as follows:
From kumc_835_111200.RMT.dat to kumc_835_111200RMT.dat
kumc_835_111200.KMR.dat to kumc_835_111200KMR.dat
.................etc
How do I do that whithout doing a sed ... (10 Replies)
hi
I would like to ask if someone knows a command or a script on how to rename a multiple file in the directory starting at the end of the filename or at the .extension( i would like to remove the last 11 character before the extension) for example
Below is the result of my command ls inside... (5 Replies)
Hi every one,
i have to dot pc files. One have main function but one dont have.I have to call dot pc file using system () cmd.File is being call have main function.Please let me know how i can call .pc file with two arguments from other dot pc file.I want some thing like sprintf(buf, "ss_xxx.pc... (4 Replies)
Hi every one,
i have to dot pc files. One have main function but one dont have.I have to call dot pc file using system () cmd.File is being call have main function.Please let me know how i can call .pc file with two arguments from other dot pc file.I want some thing like
sprintf(buf,... (1 Reply)
Hi,
I am creating a phonebook to store the name:phone:address.The phonebook is used to store, edit,delete and list the data. Now i need to use text file(dot files) for configuration (saving and loading selections). I really don't know how to do that. Please help
thanks.. (6 Replies)
hey. i am a bit new to unix and i am trying to figure out how to list the names of the 'dot' files that are in my account.
what command does this?
thank you very much for your help. (4 Replies)
Hi,
I have a file with below values.
/uvxapps/etl/Ascential/DataStage/DSEngine/dsenv.orig
/uvxapps/etl/Ascential/DataStage/DSEngine/dsenv
/uvxapps/etl/Ascential/DataStage/DSEngine/sample/.cshrc
/uvxapps/etl/Ascential/DataStage/DSEngine/sample/.login... (3 Replies)