Sponsored Content
Top Forums Shell Programming and Scripting Strange behaviour on my Linux Server. Post 302951860 by mohtashims on Tuesday 11th of August 2015 08:28:35 AM
Old 08-11-2015
Error Strange behaviour on my Linux Server.

Hi,

I keep getting this error when i run my script:

Quote:
rm: cannot remove `/siebel/sfs/tmp/dump': Directory not empty
No matter how many times i run this rm -rf /siebel/sfs/tmp/dump it succeeds when i expect it only the first time to succeed becoz i expect the second to fail as the directory should be gone in the first run.

i had earlier mentioned the rm -rf /siebel/sfs/tmp/dump which I later commented out however with no rm -rf /siebel/sfs/tmp/dump in my scripts so why do i still get
Quote:
rm: cannot remove `/siebel/sfs/tmp/dump': Directory not empty
I had earlier noticed this error during my script runtime

Below is all where "dump" is used in my scripts

Code:
grep dump *
runcda.sh_tmp:#rm -rf /siebel/sfs/tmp/dump
runcda.sh_tmp:#mkdir -p /siebel/sfs/tmp/dump
runcda.sh_tmp:echo Calling /home/admin/analysis_new.sh_tmp $startd $endd on $(hostname)
runcda.sh_tmp:filename=$(echo "/siebel/sfs/tmp/dump/$(hostname)_$(date).out" | tr -d "[:space:]")
runcda.sh_tmp:#echo /home/admin/analysis_new.sh $startd $endd
runcda.sh_tmp:echo /home/admin/analysis_new.sh_tmp $startd $endd > $filename &
runcda.sh_tmp:#/home/admin/analysis_new.sh $startd $endd > $filename &
runcda.sh_tmp:/home/admin/analysis_new.sh_tmp $startd $endd >> $filename
runcda.sh_tmp:#/home/admin/analysis_new.sh $startd $endd
runcda.sh_tmp:cd /siebel/sfs/tmp/dump/
runcda.sh_tmp:cat "$file" >> all_dump_$tdate.out
runcda.sh_tmp:cat * > all_dump_$tdate.out;
runcda.sh_tmp:echo "Analysis Today" | mailx -a all_dump_$tdate.out me@hello.com
analysis_new.sh_tmp:#rm -rf /siebel/sfs/tmp/dump
analysis_new.sh_tmp:mkdir -p /siebel/sfs/tmp/dump
analysis_new.sh_tmp:#echo "scp 
analysis_new.sh_tmp:#        scp

Can you suggest whats wrong.

I also remember once seeing the Device busy error but not sure if it is related to this problem.

Code:
Linux myserver 2.6.32-431.5.1.el6.x86_64 #1 SMP Fri Jan 10 14:46:43 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

very strange behaviour on unix server

Hi guys, im encountering some very strange behaviour (intermittently) when visiting my domain. We have a dedicated unix server hosting a number of sites with the problem currently reported on one site. I go to mydomain.com, and am directed to http://www.mydomain.com/?fnf=1 Classified ads... (7 Replies)
Discussion started by: bolo77
7 Replies

2. Linux

/etc/passwd strange behaviour!

Hi there, first of all, here is my conf of a uname -a Linux SAMBA 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown on a fedora machine. Here is my problem: every once in a while, the line containing root disappears in the /etc/passwd, disabling all logging on my server. Any one have... (0 Replies)
Discussion started by: penguin-friend
0 Replies

3. Shell Programming and Scripting

A Strange Behaviour!!!

Can some-one give me a view to this : I have a directory in an unix server, having permissions r-xr-xr-x .This directory is basically a source directory. Now there is another directory basically the destination directory which has all the permissions. Note:I log in as not the owner,but user... (5 Replies)
Discussion started by: navojit dutta
5 Replies

4. UNIX for Advanced & Expert Users

Strange sed behaviour

$ echo a.bc | sed -e "s/\|/\\|/g" |a|.|b|c| $ Is the behavior of the sed statement expected ? Or is this a bug in sed ? OS details Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
Discussion started by: vino
8 Replies

5. UNIX for Dummies Questions & Answers

Strange Program behaviour

Had a strange thing going on with my code. It's ok I figured it out for myself.... (2 Replies)
Discussion started by: mrpugster
2 Replies

6. Shell Programming and Scripting

Strange behaviour with perl i/o?

Hi All, I got a strange problem here. I have a perl script which is fetching data from a database table and writing a file with that data. If i run that script from linux command line, the file it creates is a normal ascii text file without any binary character in it.But... (9 Replies)
Discussion started by: DILEEP410
9 Replies

7. HP-UX

Strange login behaviour

Hi all, I am using HP-UX and I have just noticed that when I log into the network it seems to save the previous windows that were subsequently closed on previous occasions. Does anyone know when I log in, it seems to display these previous windows, e.g. nedit windows open again? Does... (1 Reply)
Discussion started by: cyberfrog
1 Replies

8. Shell Programming and Scripting

Strange RegExp Behaviour

Hello, I was trying to identify lines who has a word of the following pattern "xyyx" (where x, and ys are different characters). I was trying the following grep - egrep '(\S)()\2\1' This pattern do catches the wanted pattern, but it also catches "GGGG" or "CCCC" patterns. I was trying to... (5 Replies)
Discussion started by: itskov
5 Replies

9. Red Hat

Crontab strange behaviour

Hi all, I'm having this scenario which for the moment I cannot resolve. :( I wrote a script to make a dump/export of the oracle database. and then put this entry on crontab to be executed daily for example. The script is like below: cat /home/oracle/scripts/db_backup.sh #!/bin/ksh ... (3 Replies)
Discussion started by: enux
3 Replies
CRASHINFO(8)						    BSD System Manager's Manual 					      CRASHINFO(8)

NAME
crashinfo -- analyze a core dump of the operating system SYNOPSIS
crashinfo [-d crashdir] [-n dumpnr] [-k kernel] [core] DESCRIPTION
The crashinfo utility analyzes a core dump saved by savecore(8). It generates a text file containing the analysis in the same directory as the core dump. For a given core dump file named vmcore.XX the generated text file will be named core.txt.XX. By default, crashinfo analyzes the most recent core dump in the core dump directory. A specific core dump may be specified via either the core or dumpnr arguments. Once crashinfo has located a core dump, it analyzes the core dump to determine the exact version of the kernel that generated the core. It then looks for a matching kernel file under each of the subdirectories in /boot. The location of the kernel file can also be explicitly provided via the kernel argument. Once crashinfo has located a core dump and kernel, it uses several utilities to analyze the core including dmesg(8), fstat(1), iostat(8), ipcs(1), kgdb(1), netstat(1), nfsstat(1), ps(1), pstat(8), and vmstat(8). The options are as follows: -d crashdir Specify an alternate core dump directory. The default crash dump directory is /var/crash. -n dumpnr Use the core dump saved in vmcore.dumpnr instead of the latest core in the core dump directory. -k kernel Specify an explicit kernel file. SEE ALSO
textdump(4), savecore(8) HISTORY
The crashinfo utility appeared in FreeBSD 6.4. BSD
June 28, 2008 BSD
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy