troubleshooting Question

find command in shell script dont execute thru cron

Avatar of Pra Sys
Pra SysFlag for India asked on
LinuxShell Scripting
38 Comments1 Solution487 ViewsLast Modified:
Hi,

I have below command in one of my script -

dirs=( $(/usr/bin/find -L /home/mumbaikar/data -maxdepth 1 -type d -printf '%P\n') )

/home/mumbaikar/data is a symlink which points to a folder which has many subdirectories. I want to push this list of subdirectories in the array variable "dirs". Howevere, when I run the script manually it works fine. The find command doesn't execute when the script is scheduled to run thru cron. any ideas?

Mumbaikar
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 38 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 38 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros