10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to run a script/command on all the directories in a directory tree?
The below script is just for the files in a single directory, how to run it on all the directories in a directory tree?
#!/bin/sh
for audio_files in *.mp3
do
outfile="${audio_files%.*}.aiff"
sox "$audio_files"... (2 Replies)
Discussion started by: temp-usr
2 Replies
2. Shell Programming and Scripting
Hi,
I have below directories
Direct 2013-08-12 23123
Direct 2013-08-13 24121
Direct 2013-08-14 34513
Direct 2013-08-31 15435
...........
Direct 2013-09-12 53145
Direct 2013-09-30 65234
Direct 2013-09-30 89642 (11 Replies)
Discussion started by: learnbash
11 Replies
3. Shell Programming and Scripting
I have a script that I am using to copy around 40-70k files to a NFS NAS.
I have posted my code below in hopes that someone can help me figure out a faster way of achieving this.
At the end of the script i need to have all the files in the list, copied over to the nas with source directory... (8 Replies)
Discussion started by: nitrobass24
8 Replies
4. Shell Programming and Scripting
Hello, I have an RPM package for which I need to know the base directory /opt/appdir. But if the package is relocated, then it will be different. I need to get the value dynamically.
I tried to query the RPM with INSTPREFIXES but couldn't get the value. The only way I see is to do 'rpm -ql RPM... (2 Replies)
Discussion started by: chiru_h
2 Replies
5. UNIX for Dummies Questions & Answers
i have this find command on my script as:
for i in `find $vdir -name "$vfile" -mtime +$pday`
the problem with this code is that the sub-directories are included on the search. how do i restrict the search to confine only on the current directory and ignore the sub-directories. please advise.... (7 Replies)
Discussion started by: wtolentino
7 Replies
6. Solaris
Hey all,
I'm attempting to migrate a zone from one system to another, but I noticed that on the new system ssl BASEDIR was missing. I was wondering if creating the directory path for this would fix the issue when I migrate files over.
SSL is installed on the new system but does not show a... (1 Reply)
Discussion started by: em23
1 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
how would I find out if the command/script exists on the system ( HP-UX, Linux ) and if it does run it so it would display the output?
lets say I can do
which any-command
and if it finds any-command I want to run it ...
I can use echo $? to see what the which command... (2 Replies)
Discussion started by: mirusko
2 Replies
8. UNIX for Dummies Questions & Answers
I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.
so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to run ls -lrt command along with find command. I want to get the list of files with timestamp, owner, group and permissions for the files larger than 1024k. I tried the below command, but it displays only the file names.
ls -lrt | find . -name "*.*" -size +1024k -print
Any... (7 Replies)
Discussion started by: TonySolarisAdmi
7 Replies
10. Shell Programming and Scripting
I want to get the file which created the error when the find command was run ?
I am wrote a script to mail a list of files whose file size is ge than 0 and returns 0
but wen it finds a folder with only empty files it exits as 1. i need to modify it so that the return for this is also 0 (but it... (1 Reply)
Discussion started by: guhas
1 Replies