find

Find all domains under a TLD

扶醉桌前 提交于 2019-12-20 10:27:14
问题 I'm trying to find a way to list all registered domains under a top-level domain (TLD). I.e. everything under .com, .net, etc. All the tools I find only applies to finding subdomains under a domain. 回答1: The information you seek isn't openly available. However, there are a few options you can try: You might want to try inquiring at the respective registries directly about getting access to the Zone files. However, the process can take weeks and some registries choose not to offer access at

Unix Command to List files containing string but *NOT* containing another string

£可爱£侵袭症+ 提交于 2019-12-20 08:49:57
问题 How do I recursively view a list of files that has one string and specifically doesn't have another string? Also, I mean to evaluate the text of the files, not the filenames. Conclusion: As per comments, I ended up using: find . -name "*.html" -exec grep -lR 'base\-maps' {} \; | xargs grep -L 'base\-maps\-bot' This returned files with "base-maps" and not "base-maps-bot". Thank you!! 回答1: Try this: grep -rl <string-to-match> | xargs grep -L <string-not-to-match> Explanation: grep -lr makes

Using regular expressions to find img tags without an alt attribute

天大地大妈咪最大 提交于 2019-12-20 08:44:06
问题 I am going through a large website (1600+ pages) to make it pass Priority 1 W3C WAI. As a result, things like image tags need to have alt attributes. What would be the regular expression for finding img tags without alt attributes? If possible, with a wee explanation so I can use to find other issues. I am in an office with Visual Web Developer 2008. The Edit >> Find dialogue can use regular expressions. 回答1: This is really tricky, because regular expressions are mostly about matching

Using find command in bash script

為{幸葍}努か 提交于 2019-12-20 08:41:43
问题 I just start to use bash script and i need to use find command with more than one file type. list=$(find /home/user/Desktop -name '*.pdf') this code work for pdf type but i want to search more than one file type like .txt or .bmp together.Have you any idea ? 回答1: Welcome to bash. It's an old, dark and mysterious thing, capable of great magic. :-) The option you're asking about is for the find command though, not for bash. From your command line, you can man find to see the options. The one

More efficient way to find & tar millions of files

别等时光非礼了梦想. 提交于 2019-12-20 08:37:26
问题 I've got a job running on my server at the command line prompt for a two days now: find data/ -name filepattern-*2009* -exec tar uf 2009.tar {} ; It is taking forever , and then some. Yes, there are millions of files in the target directory. (Each file is a measly 8 bytes in a well hashed directory structure.) But just running... find data/ -name filepattern-*2009* -print > filesOfInterest.txt ...takes only two hours or so. At the rate my job is running, it won't be finished for a couple of

Find and delete specific file and sub directory within a directory using Python

梦想与她 提交于 2019-12-20 07:43:07
问题 I am trying to automate a search and delete operation for specific files and folder underneath a specific folder. Below is the folder structure which I have: Primary Directory is MasterFolder, which includes multiple sub directories which are Child Folders Fol1, Fol2, Fol3, Fol4 the sub directories may vary folder to folder. The Sub folders have more files and subfolders. ExL Fol1 holds someFilesFolder, sometext.txt, AnotherFilesFolder same applies to other Fol2,Fol3 etc sub directories under

MongoDB - DBRef

人走茶凉 提交于 2019-12-20 06:29:11
问题 I am having some troubles with DBRef, look this case: db.fruit.save ({"_id" : "1" , "name" : "apple"}); db.fruit.save ({"_id" : "2" , "name" : "grape"}); db.fruit.save ({"_id" : "3" , "name" : "orange"}); db.fruit.save ({"_id" : "4" , "name" : "pineapple"}); db.basket.save ({"_id" : "1", "items" : [ {"$ref" : "fruit", "$id" : "1", "quantity" : 5}, {"$ref" : "fruit", "$id" : "3", "quantity" : 10} ]}) Now, lets find the "basket" collection: > db.basket.find () { "_id" : "1", "items" : [ { "$ref

BeautifulSoup Find within an instagram html page

倾然丶 夕夏残阳落幕 提交于 2019-12-20 05:12:18
问题 I have a problem to find something with bs4. I'm trying to automatically find some urls in an html instagram page and (knowing that I'm a python noob) I can't find the way to search automatically within the html source code the urls who are in the exemple after the "display_url": http..." . I want to make my script search multiples url who appears as next as "display_url" and download them. They have to be extracted as many times as they appear in the source code. With bs4 I tried the : f =

Find a given key's value in a nested ordered dict python

社会主义新天地 提交于 2019-12-20 04:23:47
问题 I am trying to find the value of a given key from a nested OrderedDict. Key points: I don't know how deep this dict will be nested The name of the key I am looking for is constant, it will be somewhere in the dict I would like to return the value of the key called "powerpoint_color" in this example... mydict= OrderedDict([('KYS_Q1AA_YouthSportsTrustSportParents_P', OrderedDict([('KYS_Q1AA', OrderedDict([('chart_layout', '3'), ('client_name', 'Sport Parents (Regrouped)'), ('sort_order',

Using Matlab 'find' in a 3D logical array along the 3rd dimension only

假如想象 提交于 2019-12-20 04:08:12
问题 I have a 3D logical array, for example: A = randi([0 1],x,y,z); where x,y,z are integers. Is there a way to find the first true value along the 3rd dimension 'z', for each (x,y)? I can do it in a loop like this: B = zeros(x,y); for ix = 1:x for iy = 1:y B(ix,iy) = find(A(ix,iy,:),1,'first'); end end Is there an array operation which will allow me to do it without a loop? 回答1: Not a very straightforward one. That is because there may not be a true anywhere along the third dimension. By the way