9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to remove any files that are older than 2 days from a directory. It deletes those files. Then it comes back with a message it is a directory. What am I doing wrong here?
+ find /mydir -mtime +2 -exec rm -f '{}' ';'
rm: /mydir is a directory (2 Replies)
Discussion started by: jtamminen
2 Replies
2. Shell Programming and Scripting
Hello,
Hitting a wall on this one. When at the command prompt it works fine:
# find /home/testuser -name 'PAINT*canvasON.txt'
/home/testuser/PAINT_canvasON.txt
# pwd
/home/testuser
# ls -l PAINT*canvasON.txt
-rw-r--r-- 1 root user 23 Feb 07 02:58 PAINT_canvasON.txt... (2 Replies)
Discussion started by: seekryts15
2 Replies
3. Shell Programming and Scripting
How to search for all files with matching strings -->
find + tar + gzip + uunecode/email them in one command?
I am sure there is a right way to pass list of files to tar, then compress tar file. Then send that as attachment using uuencode in one command.. Can we do that!? (3 Replies)
Discussion started by: kchinnam
3 Replies
4. Shell Programming and Scripting
This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep
Obviosly that hasnt worked,
Any... (8 Replies)
Discussion started by: jay02
8 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I recently executed a find command that caused unexpected permission changes and we had to do a full system restore. Can someone please explain what this command would do?
find /staging/admin/scr * -exec chmod 755 '{}' +
It caused file permissions inside / to be modified strangely.
... (1 Reply)
Discussion started by: poornima
1 Replies
6. Shell Programming and Scripting
Hi all
i want to send the output of a command by email, i have done this
<comand> | mail -s <subject> <email address>
which works well, but if the command retunrs noting then i just get a blank email, is there a way to stop this
thanks
Adam (4 Replies)
Discussion started by: ab52
4 Replies
7. Shell Programming and Scripting
Hi,
In an effort to collect all my .java-files and place them in a LaTeXfile (using the listings environment of latex), i tried to use ex.
So what i have now is:
find . -name "*\.java" > latex
ex latex <<HERE
%s/\(.*\)/\\lstinputlisting{\1}
wq
HERE
So i try to escape the '\' with... (1 Reply)
Discussion started by: HannesBBR
1 Replies
8. UNIX for Dummies Questions & Answers
i need help with my script....
i am suppose to grab files within a certain date range
now i have done that already using the touch and find command (found them in other threads)
touch -d "$date_start" ./tmp1
touch -d "$date_end" ./tmp2
find "$data_location" -maxdepth 1 -newer ./tmp1 !... (6 Replies)
Discussion started by: deking
6 Replies
9. Shell Programming and Scripting
Hi
Purpose is to have a utility command to find and edit files .
I tried a function like the following in my .profile file
function vifind(){
find . -name $1 -print -exec vi {} \;
}
Is this correct? is there a better way to do it?
I see this behaving a bit strange in case of AIX, and... (6 Replies)
Discussion started by: grep_whoami
6 Replies