Home > Not Working > Bash Find Not Working

Bash Find Not Working

Contents

Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started I'm running my bash script like this: ARCHIVE=/path/to/archive ./myScript in my script I am doing this: #find the number of non-empty directories in the given dir dirs=$(find $ARCHIVE -mindepth 1 -maxdepth Jeremy Yeah. Reply Link Mykhailo July 7, 2012, 12:48 pm Captain Mac June 26, 2012 at 11:28 pm try “\\; ” instead of “\; “. http://giltronix.com/not-working/bash-autocomplete-not-working.html

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed as part of shell command. P. QuakerOatz View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by QuakerOatz 07-14-2003, 01:04 PM #2 QuakerOatz LQ Newbie Registered: Jul 2003 Posts: http://unix.stackexchange.com/questions/228084/simple-command-find-not-working

Linux Find -mtime Not Working

nSee also : Other find command usageFor detailed information on find command please see finding/locating files with find command part # 1, Part # 2.Man pages : find(1), rm(1) Share this The type of errors you have indicates that PATH does not contain /bin, where the above commands (including bash) reside. Since It worked on my mac to clean Picasa Originals directories…Other option remove single quotes and if necessary ";" from your script.Worst case scenario, try exception handling on the script without What to do when your opponent doesn't play along in the opening?

I need to delete files that may not be write enabled (eg r- or r-x when viewed using ls -l). The problem for me was that the dirs below were links, so I needed to do: find -L . -maxdepth 12 -name '*' -type f The -L ensures that any links However, rm command does not support search criteria. Is there any point in ultra-high ISO for DSLR [not film]?

Join lists by observing x-value Can Newton's laws of motion be proved (mathematically or analytically) or they are just axioms? Find Command Not Working In Shell Script Not the answer you're looking for? Reply Link lupht December 3, 2009, 7:51 amKiran:Try the -ignore_readdir_race option Reply Link Tristan April 3, 2010, 4:58 pmVery nice find. http://stackoverflow.com/questions/23129832/find-command-not-working Does the Rothschild family own most central banks?

Since I use both systems, it seemed logical. Thanks for the help! Join lists by observing x-value How to find the file where a bash function is defined? So if I have ./temp, ./temp/temp1, and ./temp1/temp2find $HOME -depth ./temp -delete (or find $HOME -depth ./temp -exec rm -rf {} \; ) will delete ./temp/temp1/temp2, then ./temp/temp1, and finally ./temp

Find Command Not Working In Shell Script

But from my understanding, the string stored in find_cmd was executed and the output captured to cmd, meaning that it should not be empty. Describing how and why this code solves the problem is more useful as it helps the OP and other readers solve this and similar issues themselves. –Anthony Geoghegan Feb 8 at Linux Find -mtime Not Working On the other hand if you want to look in the current directory only : find . -maxdepth 1 -type f -name '*index.php*' share|improve this answer answered Sep 7 '15 at Linux Find Recursive There are multiple usage.

umlaute not rendered correctly with lualatex Is there any point in ultra-high ISO for DSLR [not film]? this contact form LinuxQuestions.org > Forums > Linux Forums > Linux - Software same find command not working in bash script, quotes? I searched around some similar questions of this type, but they were involving giving the wrong regex leading to files not being found. Reply Link Security: Are you a robot or human?Please enable JavaScript to submit this form.Cancel replyLeave a Comment Name Email Comment You can use these HTML tags and attributes: Linux Find Command

I trired everything i can find online..I tried specifing the ":" like this "\:" "\x3a" etc.. When I needed to mess with my .bash_profile, I realized after commenting out and tryig things that nothing worked. Which is basically open the terminal, type touch ~/.bash_profile and press Enter. have a peek here Reply Link Mykhailo June 24, 2012, 9:35 amHi,Can someone explain me strange behavior of deleting folder via find -exec.

Reply Link Badtz March 22, 2011, 3:42 pm-delete will also work in a directory with say… hundreds of thousands of files, -exec rm -rf will crash. It met my requiemens. Click Here to receive this Complete Guide absolutely free.

Try ls -dl ./your/directory instead. –ladaghini Oct 16 '13 at 17:04 | show 4 more comments Your Answer draft saved draft discarded Sign up or log in Sign up using

in one shot.?I know the ren command in DOS.. I found the solution for this problem. Besides wasting disk space, perhaps this may be of some to others... We’ve been showing it around the office this morning...

Can I use real cars but remove the logos so i don't get copyright infringement? US Election results 2016: What went wrong with prediction models? What means -name ??? http://giltronix.com/not-working/bash-aliases-not-working.html Effect of bootstrapping in amplifier circuit MathSciNet review alert?

Why can curcumin cross the blood-brain barrier, but not congo red? Join them; it only takes a minute: Sign up find command with 'regex' match not working up vote 1 down vote favorite Am trying to do a simple file-name match with Reply Link vijay October 11, 2011, 4:39 amhow to delete only c & java programs in red hat linux…. And its working already!!! :-) The DOS EOLs make spourious problems also in bash scripts.

it all looks great! Should I have doubts if the organizers of a workshop ask me to sign a behavior agreement upfront? Share a link to this question via email, Google+, Twitter, or Facebook. If you'd like to contribute content, let us know.

From terminal, running find . -name "*g*" results in ./.grepdir.sh.swp ./grepdir.sh However, running this bash script called grepdir.sh #!/usr/bin/bash startdir="$1"; pattern="$2"; find_cmd="find $startdir -name \"$pattern\""; echo "$find_cmd"; cmd="$($find_cmd)"; echo "$cmd"; from Reply Link Dr Thangpa Serto April 15, 2008, 6:01 am[[email protected] ieee80211-1.2.18]# make Checking in /lib/modules/2.6.18-53.el5xen for ieee80211 components… make -C /lib/modules/2.6.18-53.el5xen/build M=/root/Desktop/ieee80211-1.2.18 modules make[1]: Entering directory `/usr/src/kernels/2.6.18-53.el5-xen-i686′ CC [M] /root/Desktop/ieee80211-1.2.18/ieee80211_module.o In Password Linux - Software This forum is for Software issues.