
{"id":7984,"date":"2012-12-19T14:09:15","date_gmt":"2012-12-19T14:09:15","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=7984"},"modified":"2012-12-19T14:09:15","modified_gmt":"2012-12-19T14:09:15","slug":"xargs-and-cd-with-more-manipulation","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2012\/12\/19\/xargs-and-cd-with-more-manipulation\/","title":{"rendered":"xargs AND cd  WITH MORE MANIPULATION"},"content":{"rendered":"<p><u>ABOUT xargs<\/u><\/p>\n<pre>\nxargs is a command on Unix and most Unix-like operating systems used to build and execute commands from standard input. It converts input from standard input into arguments to a command.\n\nSome commands such as grep and awk can take input either as command-line arguments or from the standard input. However, others such as cp and echo can only take input as arguments, which is why xargs is necessary.\n<\/pre>\n<p><u>TYPICAL SHELL SESSION EXPOSURE<\/u><br \/>\n[bash]<br \/>\n$ls shelter\/<br \/>\nsymmel<br \/>\n$ls shelter\/ | xargs cd &#8211;<br \/>\nxargs: cd: No such file or directory<br \/>\n$ls shelter\/ | xargs sh -c cd &#8211;<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$ls shelter\/ | xargs ls<br \/>\nls: cannot access symmel: No such file or directory<br \/>\n$ls shelter\/ | xargs cd<br \/>\nxargs: cd: No such file or directory<br \/>\n$ls shelter\/ | xargs sh -c cd<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$ls shelter\/ | xargs `sh -c cd &#8211; `<br \/>\nsymmel<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$ls shelter\/ | xargs `sh -c cd `<br \/>\nsymmel<br \/>\n$ls shelter\/ | xargs sh -c cd<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$ls shelter\/ | xargs `sh -c cd` &#8211;<br \/>\nxargs: -: No such file or directory<br \/>\n$ls shelter\/ | xargs sh -c cd &#8211;<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$cd symmel-code\/<br \/>\n$cd ..<br \/>\n$pwd<br \/>\n\/home\/jeffrin<br \/>\n$cd shelter\/symmel\/<br \/>\n$ls<br \/>\nAlgorithms  beautifulwork  books\t config-files\tDocs\t  https:  language  ovlfose<br \/>\nart.text    bookmark\t   bugs-general  debian-howtos\tfirewall  kernel  linux     README<br \/>\n$ls config-files\/ | xargs ls<br \/>\nls: cannot access corporation-style.txt: No such file or directory<br \/>\nls: cannot access dot-bashrc: No such file or directory<br \/>\nls: cannot access dot-emacs: No such file or directory<br \/>\nls: cannot access dot-gitconfig: No such file or directory<br \/>\nls: cannot access dot-muttrc: No such file or directory<br \/>\nls: cannot access dot-muttrc-personal: No such file or directory<br \/>\nls: cannot access dot-procmailrc: No such file or directory<br \/>\nls: cannot access fullscreen.text: No such file or directory<br \/>\nls: cannot access git-smtp-yahoo-commands.txt: No such file or directory<br \/>\nls: cannot access likins-glow.scm: No such file or directory<br \/>\nls: cannot access minimal-style.sheet.txt: No such file or directory<br \/>\nls: cannot access regex.txt: No such file or directory<br \/>\nls: cannot access save: No such file or directory<br \/>\nls: cannot access scripts: No such file or directory<br \/>\nls: cannot access sources.list: No such file or directory<br \/>\nREADME<br \/>\n$cd config-files\/ | xargs ls<br \/>\nAlgorithms  beautifulwork  books\t config-files\tDocs\t  https:  language  ovlfose<br \/>\nart.text    bookmark\t   bugs-general  debian-howtos\tfirewall  kernel  linux     README<br \/>\n$pwd<br \/>\n\/home\/jeffrin\/shelter\/symmel<br \/>\n$cd config-files\/ | xargs pwd<br \/>\n\/home\/jeffrin\/shelter\/symmel<br \/>\n$cd config-files\/<br \/>\n$pwd<br \/>\n\/home\/jeffrin\/shelter\/symmel\/config-files<br \/>\n$cd ..<br \/>\n$pwd<br \/>\n\/home\/jeffrin\/shelter\/symmel<br \/>\n$<\/p>\n<p>[\/bash]<\/p>\n<p>RELATED LINKS<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/Xargs\">https:\/\/en.wikipedia.org\/wiki\/Xargs<\/a><br \/>\n<a href=\"https:\/\/shapeshed.com\/unix-xargs\/\">https:\/\/shapeshed.com\/unix-xargs\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ABOUT xargs xargs is a command on Unix and most Unix-like operating systems used to build and execute commands from standard input. It converts input from standard input into arguments to a command. Some commands such as grep and awk can take input either as command-line arguments or from the standard input. However, others such &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2012\/12\/19\/xargs-and-cd-with-more-manipulation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;xargs AND cd  WITH MORE MANIPULATION&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[83],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7984"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=7984"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/7984\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=7984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=7984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=7984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}