Operating on a directory and its subdirectories, recursively.
6
votes
4answers
3k views
Finding a substring in files across subdirectories with a single built-in command?
In Windows, if I wanted to find a string across all files in all subdirectories, I would do something like
findstr /C:"the string" /S *.h
However, in Linux (say, Ubuntu) I have found no other way ...
12
votes
3answers
2k views
How to list files that were changed in a certain range of time?
How can I list recursively all files that were changed between 22.12.2011 and 24.12.2011?
5
votes
4answers
1k views
find not recursive when file at top
Imagine a source tree. There are xml files everywhere.
But since there is a XYZ.xml at the root of this tree it won't find my xml files.
find -iname *.xml
returns
./XYZ.xml
instead of
...
2
votes
3answers
193 views
Manipulate file name piped from find command
I'm relatively new to Bash and am trying to do something that on the surface seemed pretty straightforward - run find over a directory hierarchy to get all of the *.wma files, pipe that output to a ...
2
votes
2answers
183 views
Searching for string in files
Is there an easy way to search inside 1000s of files in a complex directory structure to find files which contain a specific string within the file?
1
vote
2answers
964 views
How to grep a text recursively on BusyBox 1.0?
How can I find a file containing a certain string on a BusyBox 1.0, if grep -r does not work?
6
votes
5answers
11k views
How do I count all the files recursively through directories
I want to see how many files are in subdirectories in there subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage
du -sh /*
which will ...
10
votes
2answers
544 views
Tar up all PDFs in a directory, retaining directory structure
I'm trying to create a compressed tarball that contains all PDF files that exist in one of my directories. The directory structure needs to be retained. Empty directories are not needed, but I really ...
3
votes
3answers
2k views
Using sftp to Transfer a Directory?
When I try to use sftp to transfer a directory containing files, I get an error message:
skipping non-regular file directory_name
The directory contains a couple of files and two subdirectories.
...
4
votes
1answer
128 views
What is the tool that allows me to specify arbitrary directories using **
I once saw a colleague uses a tool which allows to use ** to represent any directories. For example: if a file called myfile.java sits deep inside:
src/main/com/mycompany/product/store/myfile.java
...
3
votes
6answers
1k views
Recursive search doesn't work for grep on solaris
On out Solaris server I'm finding that grep -r doesn't work, which is the usual way that I used grep. It seems that egrep is the same.
Given that I have no control over the machine, is there a way to ...
1
vote
1answer
343 views
How do I create a local copy of a complete website section from OSX using curl?
I'm trying to download Mathematics of the Discrete Fourier Transform
so that I can read through it off-line on my iPad (which doesn't have an Internet connection)
I have used wget in Linux. It seems ...