File exists, -f not specified and is running in the background


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File exists, -f not specified and is running in the background
# 1  
Old 06-02-2014
File exists, -f not specified and is running in the background

Hi guys,
i am not too sure how i got this error,

file exists, -f not specified and is running in the background

my coding is just schedule to rm files that is more then 365 days.

Code:
find $BDUMP_DIR -name "*.bak.Z" -mtime +365 -exec rm {} \;

SmilieSmilie
# 2  
Old 06-02-2014
-type f this would run only on files, not directories
Code:
find /path/to/files  -name "*.bak.z" -type f -mtime +365 -delete

execute this first you will come to know what you are going to delete, once after confirm use -delete

Code:
find /path/to/files  -name "*.bak.z" -type f -mtime +365

This User Gave Thanks to Akshay Hegde For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running script in background

Hi, I wrote a KSH script and running it on HP-UX machine I am running one script in background. My script is at location $HOME/myScript/test/background_sh When I view my script in background with psu commend > psu | grep background_sh I see following output UID PID PPID C ... (1 Reply)
Discussion started by: vaibhav
1 Replies

2. Shell Programming and Scripting

Running scripts in background

Hi, below is my master script wihch inturn runs 2 scripts in background #master_script.sh ./subscript1.sh & ./subscript2.sh & executed the master_script.sh from unix command prompt $ ./master_script.sh it is executing the subscripts and they are completing fine, however master_script.sh is... (2 Replies)
Discussion started by: JSKOBS
2 Replies

3. Solaris

running command in background

hi all i am running following command ufsdump 0ubf 512 /dev/rmt/0cbn /database/backup2/rman_backup/level1 >> /database/backup2/backup_tape/level1_rman_03aug12 2>&1; i want to run it in background how can i do it in this i am generating logs for backup. the problem occurs when i am... (3 Replies)
Discussion started by: nikhil kasar
3 Replies

4. Shell Programming and Scripting

Running in background

Hello, I was trying to make some processes to run at background and went to a problem. First I tried just to loop in one line something like this: for i in {1..10}; do echo 'hello world' &; done; but it pops a syntax error, so I tried several ways to fix it but wasn't able to understand... (2 Replies)
Discussion started by: Rash
2 Replies

5. Red Hat

MySQL is not running, but lock exists

# service mysql status MySQL is not running, but lock exists I deleted the lock using rm /var/lock/subsys/mysql still the problem persists. I tried using mysqld_safe, still the same issue. Unable to start mysql # mysqld_safe nohup: ignoring input and redirecting stderr to... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies

6. Shell Programming and Scripting

running the script in background

I have a script called startWebLogic.sh which I was running in the background but the problem is which I used the command :- ps -elf | grep "startWebLogic.sh" | grep -v grep to find the process id but I was unable to find the process id for this script and when I checked from the front end the... (3 Replies)
Discussion started by: maitree
3 Replies

7. Solaris

About running processes in background

Hi, I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers. How should I proceed? What are the main steps? Thanks, JVerstry (9 Replies)
Discussion started by: JVerstry
9 Replies

8. Shell Programming and Scripting

Running RSH on the background

Hi, I am developing a script that would do a 'rsh' on a client machine. I want to invoke a script in client machine which would keep on polling data to the server. I want the rsh to return back once it invoked the script on client and the script should run on background on client. ... (2 Replies)
Discussion started by: eamani_sun
2 Replies

9. Shell Programming and Scripting

running in background

i have a script called server.sh. how to run this script in backgroung using nohup command (5 Replies)
Discussion started by: ali560045
5 Replies

10. UNIX for Dummies Questions & Answers

running process in background

I'm trying to install a solaris 9 patch cluster and when I try to use & to run in background it won't allow me to enter in my sudo password so it fails the install and sudo auth. Does Solaris not have screen like linux? If & will work what am I doing wrong? sudo ./install_cluster -q & is... (3 Replies)
Discussion started by: kingdbag
3 Replies
Login or Register to Ask a Question