Thread moved. Please do not post general scripting questions in the AIX forum. Feel free to mention that you are using AIX in your question, but post scripting questions in the appropriate sub-forum. Thank you.
Last edited by Scott; 03-06-2014 at 07:28 AM..
Reason: Moved thread
The problem here is that the shell is expanding your command before executing, so if it's going to match one file, it's probably fine. Matching 20 will be a problem as you will actually execute:-
Of course, you might match 5000 files. This is why giving the directory name only as the first parameter to find and using the -name "*.aud" arguments will be far better. This tels it to search from one location and match files (directories, pipes, etc.) based on your expression. That actual command executed is as seen, without expansion. Remember to keep *.aud quoted.
I hope that this explanation helps show why ahamed101 has a good solution.
Howdy.
I'm currently hoping to putty to a number of Linux VMs and update a hosts file remotely before moving on to the next VM in a list. Does anyone have a script that does anything similar? Are there any decent script repositories online? (2 Replies)
Hi,
I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios.
1)How to delete the existing files in the tar file.
suppose i have a main tarfile named application.tar and it contains a file called ingres.tar.
what is the command to remove ingres.tar... (2 Replies)
In my redhat 5 sysem , there are many files are generated to a directory, I would like to do the housekeeping as following , move the files elder than 90 days to a specific directory , then remove the the files elder than 180 days from this specific directory ,
I have a script to do it .
... (2 Replies)
Hi,
I have multiple xml files and named
1233__AAA__12.xml
1234__AAA__12.xml
2125__AAA__13.xml
2127__AAA__13.xml
and I want to delete or to remove only these with the hightest ID e.g. files 1234__AAA__12.xml and 2127__AAA__13.xml.
Could you tell me how can i do that? Is there any script?... (5 Replies)
Guy's
When I execute lppchk -v I have seen about 9 BROKEN Files
lppchk: The following filesets need to be installed or corrected to bring
the system to a consistent state:
Pls advide how to forcely Remove these BROKEN Files ? (1 Reply)
I know that rm -i, asks a user before removing a file. What I need to accomplish is removing files from a different directory without switching to that directory. Example: I'm currently in directory dog and I want to remove all the files of a certain name in directory cat, but from within the dog... (5 Replies)
Hi,
How do i remove all the files that are present in the directory.. I know a way of doing this..that is by using *.* .. But my directory has executables or some files without extensions... So they are not getting deleted. What do i do to remove all of them?
Thanks,
Nisha (7 Replies)