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

learn more… | top users | synonyms

2
votes
3answers
130 views

Attachments are missing when multiple files are attached in mail

I have written one script to get multiple attachments through mail. My script is for file in `find $dir -ctime -2 -type f -name "Sum*pdf*"` do echo "$file" filename=`basename $file` echo $filename ...
1
vote
3answers
98 views

How to enter foo-* folder without actually using wildcard or shell expansions?

Short story I'm looking for the command to enter first found foo-something directory like: cd foo-* but without using wildcard (or other special shell characters). Long story As part of the ...
1
vote
2answers
256 views

Find command for lookup up a directory tree

Is there any equivalent command, or options for, GNU find that will search up the directory tree? I'd like to look backwards through the tree for files with a given name. For example, say I'm in ...
0
votes
2answers
161 views

touch & gzip all HTML, CSS, JS files in a directory recursively

I'm trying to optimize Nginx server. I've enabled Gzip_Static_Module to serve pre-compressed gzip static files like CSS, JS, HTML. Nginx Wiki says that the timestamps of the compressed and ...
1
vote
1answer
20 views

How do I find/list all files on filesystem with a certain SELinux “fcontext”

I'm having trouble finding information on what command, presumably from setools, I should use to find all the files on my filesystem that are labeled by SELinux with a certain file-context (fcontext). ...
1
vote
1answer
32 views

Different results OS X/Linux with “find PATH -mount \( -type f -o -type d \) -print0 | LC_ALL=C sort --zero-terminated > OUTPUT.txt”

this command is part of a script I use for comparing files: find test/ -mount \( -type f -o -type d \) -print0 \ | LC_ALL=C sort --zero-terminated > OUTPUT.txt // test/ is the PATH ...
1
vote
1answer
504 views

find and exec: why does this command not work?

I don't get why echo prints empty line (latest cygwin version): ~/tmp >find mydor/ -name "*php" mydor/es/c/packags.php mydor/etns/inx.php mydor/pacepors.php mydor/XAE.php ~/tmp >find mydor/ ...
0
votes
1answer
59 views

bash: What is the difference between these two script variants?

(Note: Both of these examples may require GNU or BSD find and may not work as-is with the POSIX "edition" of find). Both of the scriptlets below must be understood as excerpts from way more complex ...
0
votes
1answer
70 views

Delete subfolder and keeping up parent folder

I need to delete folderx which are not accessed for seven days, easily I can do it with next: find /path/folder -type d -mtime +7 |xargs rm -rf The probelm is when I have subfolder marked for ...
2
votes
0answers
428 views

diff -r only for certain file types

Is there a way I can perform a recursive diff of two directories but only compare (in their respective places) files that match a specific filename or filetype predicate? E.g. I would like to do ...
1
vote
0answers
35 views

trash and restore script - issue restoring

#!/bin/bash echo "Are you sure you want to move this file to the Recycle Bin?" "(Yes/No)" read ans case "$ans" in Yes) echo "$(readlink -f $1)" >> "$HOME/TrashLog" && mv "$1" ...
1
vote
0answers
146 views

Find command incorrect results with days filter

I am trying to find all files modified before march 6 in a directory with thousands of files. I executed the following commands in the PWD where I want to find files. find -mtime +47 > ...
1
vote
0answers
59 views

GUI for find which can show video thumbnails

Is there a GUI for find (or just a graphical search tool which supports regex searches on filenames starting from a specific directory) which is able to show thumbnails found video and image files? I ...
0
votes
0answers
54 views

Storage Formats for Flat File DB

Currently I use a flat file database with find -type f -ls to store information for about 400GB of files. I'd like to store also the md5sum/sha[1|256]sum of the files. Because the files are often ...
0
votes
0answers
123 views

Find if the file is compressed or not

I need to find whether the file is compressed or not in script.If it is compressed I need to uncompress and send as attachement. My find command results in two files sum12.pdf.Z and sum23.pdf.Z My ...
0
votes
0answers
134 views

Where is the libstdc++ test suite?

I have GCC/g++ 4.7 and it works fine. But I need to run the libstdc++ testsuite but I don't find where the testsuite is on the system and how to run it. How can I do that?