0
votes
1answer
27 views

How to use find to fill in variable in Shell script

I am making simple Shell script form some boring-ever-repeating job. Script changes directory correctly, and now I want to run other scripts based on argument I typed when running script. Other ...
1
vote
0answers
183 views

find command with exec sh doesn't work in shell script but in commandline (raspberrypi)

I want to find "old" folders in /volume1/photo/ipcam which are named like "????-??-??" and move corresponding folders within dropbox (with the same directory structure /ipcam/...) to the subfolder ...
2
votes
1answer
64 views

Simple find and copy script for linux [closed]

I'm quite a newbie to scripts in Linux. What im trying to get is a simple script that finds a file by its exact name, then copy that file to a different folder. So Essentially it should work like ...
1
vote
0answers
111 views

Linux: Trying to find files from a list recursively and copy them somewhere else

I'm trying to find files from a list and copy them to another place. So I started my test loop like that: # cat ~/my_filelist.txt | while read file ; do echo "$file" ; done After I hit enter all ...
3
votes
3answers
68 views

merge pieces of file together

I have a directory tree of files I need to loop through and reformat the lines. can I do this with sed with some combination of find? for each file, I'll need to adjust the text in the file from ...
1
vote
1answer
400 views

Bash script: Find a file inside specific folder in linux

I want to write a script to find all executable files under a specific directory which I want to pass in parameter. I am able to find all executable files using a predefined directory but I want to be ...
-2
votes
2answers
398 views

Shell script error using command find

My script is supposed to: recursively look for files and directories whose names contain given strings, using find, starting in the current directory. If no arguments are given the message Missing ...
2
votes
2answers
388 views

How can I set up an alias or shortcut to do the *nix find command?

When at the command line, I find that I have to type out this command very often: find . -iname "*php" -exec grep -H query {} \; I'd love to set up an alias, script, or shortcut to make it work ...
3
votes
7answers
2k views

UNIX find dirs that contain a particular file (pom.xml) then execute command in that dir

I want to, from a root dir, find all dirs that contain a certain file name (pom.xml), then cd to that dir and execute a command. I can do this in a script but I was hoping to do this with a single ...
6
votes
3answers
5k views

How-to limit Unix FIND results number

Is there a way to limit the number of results returned by the FIND command on an unix system? We are having performance issue due to an unsually large number of files in some directories. I'm tryging ...
0
votes
1answer
220 views

find and mail if changes has occured, unix

The following script runs and finds if any new suid has been changed, and redirects the output to a file. I want to add a mail command in the script, that will send mail to someone@domain.com. If ...