find is a command line utility to search for files in a directory hierarchy

learn more… | top users | synonyms

1
vote
2answers
184 views

Using exec in find over ssh from shell script

So, I am attempting to execute the following from within a shell script; ssh -q $CUR_HOST "cd $LOGS_DIR; echo cd $LOGS_DIR; find . -name *.log -mmin +1440 -exec gzip {} \; exit" When this runs, it ...
1
vote
2answers
1k views

Find and move directories based on file type and date

I have a directory "New Movies" containing 200+ subdirectories "Movie Name (year)". The subdirectories "Movie Name (year)" contains a single video file (avi/mkv) and several related jpg/xml files. I ...
1
vote
1answer
381 views

Speeding a find rm command with test through parallelization

I want to recursively delete all files in directories and subdirectories with number of lines less than 10, and am currently using the following command find . -type f -name "*.txt" | while read; do ...
1
vote
4answers
194 views

Syntax error in a bash script that calls find

Where is the error in this script please: #!/bin/bash rep="git" files=`find' ${rep} '-type f` for f in ${files} do echo $f done When i run find git -type f alone in the shell, it works!
1
vote
3answers
886 views

Use mogrify to resize large files while ignoring small ones

I'm running the following command: mogrify -resize '400x400>' *.png Notice the ">". Supposedly it will ignore smaller files, but although it doesn't resize them, it edits them (modification date ...
1
vote
1answer
311 views

Error creating an alias for the find command [duplicate]

Possible Duplicate: How to pass parameter to alias? I am trying to shorten the find command, but getting an error: $ alias f='find . -name $1 -print' $ f JobConf.java find: paths must ...
0
votes
2answers
3k views

How can I find files and then use xargs to move them?

I want to find some files and then move them. I can find the file with: $ find /tmp/ -ctime -1 -name x* I tried to move them to my ~/play directory with: $ find /tmp/ -ctime -1 -name x* | xargs ...
0
votes
1answer
113 views

Error trying to call find from perl

use warnings; use File::Find; my $srceDir = "//mnt/Share_Drive/Verizon PM&T/Capture Files/"; opendir(DIR, $srceDir) or die "Can't open $srceDir: $!"; my @files = (find -type f -newermt "12 Feb ...