{"id":29869,"date":"2014-04-24T15:22:41","date_gmt":"2014-04-24T20:22:41","guid":{"rendered":"http:\/\/webirix.com\/?p=29869"},"modified":"2014-04-24T15:22:41","modified_gmt":"2014-04-24T20:22:41","slug":"hacer-un-ping-a-todos-los-dominios-en-mi-servidor-shell","status":"publish","type":"post","link":"https:\/\/webirix.com\/en\/hacer-un-ping-a-todos-los-dominios-en-mi-servidor-shell\/","title":{"rendered":"Ping all domains on my shell server"},"content":{"rendered":"<p><a href=\"http:\/\/webirix.com\/wp-content\/uploads\/2014\/04\/console.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-29870 aligncenter\" src=\"http:\/\/webirix.com\/wp-content\/uploads\/2014\/04\/console.png\" alt=\"console\" width=\"233\" height=\"233\" srcset=\"https:\/\/webirix.com\/wp-content\/uploads\/2014\/04\/console.png 256w, https:\/\/webirix.com\/wp-content\/uploads\/2014\/04\/console-150x150.png 150w\" sizes=\"auto, (max-width: 233px) 100vw, 233px\" \/><\/a><\/p>\n<p>Sometimes we need to verify if all the email accounts that we have created on our server are really working correctly.<\/p>\n<p>For this problem, the Shell console (based on LINUX) has provides us with a practical solution:<\/p>\n<p>for variable in `cat \/ etc \/ localdomains`;<br \/>\ndo<br \/>\ndone<\/p>\n<p>This option allows us to ping all our domains, however, what if I have thousands of accounts? Unfortunately, the console will not be able to show us all the results.<\/p>\n<p>To solve this new problem, we can save the ping results to a text file. We must first create a .txt file at any address within our server.<\/p>\n<p>The final code would be as follows:<\/p>\n<p>for variable in `cat \/ etc \/ localdomains`;<br \/>\ndo<br \/>\nping -c 1 $variable &gt;&gt; \/home\/user\/public_html\/filename.txt;<br \/>\ndone<\/p>\n<p>&nbsp;<\/p>\n<p>To finish we must go to the file path and review the content.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sometimes we need to verify if all the email accounts that we have created on our server are really working correctly. For this problem, the Shell console (based on LINUX) offers us a practical solution: for variable in `cat \/ etc \/ localdomains`; do done This option allows us to ping all our domains, however ...<\/p>","protected":false},"author":2,"featured_media":29873,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2021,2014],"tags":[],"class_list":["post-29869","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hospedaje-web","category-programacionweb"],"jetpack_featured_media_url":"https:\/\/webirix.com\/wp-content\/uploads\/2014\/04\/bash-script.png","_links":{"self":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/29869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/comments?post=29869"}],"version-history":[{"count":1,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/29869\/revisions"}],"predecessor-version":[{"id":29874,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/posts\/29869\/revisions\/29874"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/media\/29873"}],"wp:attachment":[{"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/media?parent=29869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/categories?post=29869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webirix.com\/en\/wp-json\/wp\/v2\/tags?post=29869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}