I have a directory with 1,242,276 plain text files on my external hard drive. They are totally unorganized with meaningless numbers as their file names. The reason for that is because they were recovered by some recovery software after accidentally emptying a partition a while ago.
I am now under that directory and want to search for a word "polyhedron" among the content of all the files.
I've found out this is not as easy as I thought at first:on the other OS we know,all text files end with the .txt extension,which makes searching for them quite straightforward-no such thing on Linux,so how can I search for text files in a directory where they may be (and actually are) intermixed with all kinds of other files ?
I've been using this to search an entire directory recursively for a specific phrase in my code (html, css, php, javascript, etc.):
Code:
find dir_name -type f -exec grep -l "phrase" {} \;
The problem is that it searches ALL files in the directory 'dir_name', even binary ones such as large JPEG images.
I've been using this to search an entire directory recursively for a specific phrase in my code (html, css, php, javascript, etc.):
Code:
find dir_name -type f -exec grep -l "phrase" {} \;
The problem is that it searches ALL files in the directory 'dir_name', even binary ones such as large JPEG images.
I have a directory containing million xml files.
I want to create multiple zip files containing n number of xml files. For ex: if n = 10000, then I want to create 100 zip files i.e. each zip file will have only 10000 xml files.
What is the most efficient way to create these zip files?
I have Fedora 17 GNOME installed on my Asus 1015PX. I have my personal files on a flashdrive. After closing a new or edited text files, tmp files are permanently saved on my flashdrive. I am manually opening up my folders to search for the tmp files and manually deleting the tmp files.
Current scripts create and delete multiple files over NFS.
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way to perform this search?
I tried using find .
hi everyone,
im stuck in here with shell :) can you help me??
i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ...