{"id":6535,"date":"2023-12-28T07:06:38","date_gmt":"2023-12-28T14:06:38","guid":{"rendered":"https:\/\/ioflood.com\/blog\/?p=6535"},"modified":"2023-12-28T07:06:45","modified_gmt":"2023-12-28T14:06:45","slug":"xargs-linux-command","status":"publish","type":"post","link":"https:\/\/ioflood.com\/blog\/xargs-linux-command\/","title":{"rendered":"Mastering Xargs: Your Guide to Linux Command Efficiency"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/ioflood.com\/blog\/wp-content\/uploads\/2023\/12\/Visual-representation-of-a-Linux-terminal-employing-the-xargs-command-to-build-and-execute-command-lines-from-input-300x300.jpg\" alt=\"Visual representation of a Linux terminal employing the xargs command to build and execute command lines from input\" width=\"300\" height=\"300\" title=\"\"><\/figure>\n<\/div>\n<p>Ever found yourself overwhelmed with handling a large number of arguments in Linux? You&#8217;re not alone. Many developers find themselves in a maze when it comes to managing and processing a multitude of arguments. But, like a skilled juggler, the xargs tool in Linux can make this process a breeze. This command is a powerful utility that can read items from standard input, delimited by blanks or newlines, and execute a command.<\/p>\n<p><strong>In this guide, we&#8217;ll walk you through the process of using the xargs command in Linux<\/strong>, from understanding its basic usage to mastering its advanced features. We&#8217;ll cover everything from how to use xargs with different inputs, dealing with different flags, to troubleshooting common issues and their solutions.<\/p>\n<p>So, let&#8217;s dive in and start mastering the xargs command in Linux!<\/p>\n<h2>TL;DR: How Do I Use the xargs Command in Linux?<\/h2>\n<blockquote><p>\n  The <code>xargs<\/code> command in Linux is used to read items from standard input, delimited by blanks or newlines, and execute a command. For instance, you can pass arguments to xargs with the syntax, <code>[command] [variables] | xargs [command]<\/code>. Alternatively, you can utilize arguments with the syntax, <code>xargs [options] [command]<\/code>.\n<\/p><\/blockquote>\n<p>Here&#8217;s a simple example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo '1 2 3' | xargs\n\n# Output:\n# 1 2 3\n<\/code><\/pre>\n<p>In this example, we use the <code>echo<\/code> command to pass the string &#8216;1 2 3&#8217; to <code>xargs<\/code> via a pipe (<code>|<\/code>). The xargs command then reads the items from the standard input and prints them out.<\/p>\n<blockquote><p>\n  This is just a basic way to use the xargs command in Linux, but there&#8217;s much more to learn about managing and processing large numbers of arguments efficiently. Continue reading for more detailed information and advanced usage scenarios.\n<\/p><\/blockquote>\n<h2>The Basics of xargs Command in Linux<\/h2>\n<p>The <code>xargs<\/code> command in Linux is primarily used to construct argument lists and invoke other commands. It reads items from the standard input, separated by blanks or newlines, and executes the command once for each argument.<\/p>\n<p>Let&#8217;s look at a simple example of how the <code>xargs<\/code> command works with different inputs:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo 'apple orange banana' | xargs mkdir\n\n# Output:\n# Check the directory\n# ls\n# apple orange banana\n<\/code><\/pre>\n<p>In this example, we use the <code>echo<\/code> command to output the string &#8216;apple orange banana&#8217;, which is then piped into <code>xargs<\/code>. The <code>xargs<\/code> command takes these items and uses them as arguments for the <code>mkdir<\/code> command, creating a directory for each fruit name.<\/p>\n<p>The advantage of using <code>xargs<\/code> is that it allows you to handle large numbers of arguments efficiently. Without <code>xargs<\/code>, you would have to manually execute the <code>mkdir<\/code> command for each directory you want to create, which can be time-consuming and error-prone.<\/p>\n<p>However, there are potential pitfalls when using <code>xargs<\/code>. For example, it doesn&#8217;t handle special characters like spaces or newlines in arguments very well. If your input contains these characters, <code>xargs<\/code> might interpret it as separate arguments, leading to unexpected results. We&#8217;ll discuss how to handle such issues in the advanced usage section.<\/p>\n<h2>Unleashing the Power of xargs: Advanced Usage<\/h2>\n<p>As you become more comfortable with the basic usage of the <code>xargs<\/code> command, you can start to explore its more advanced features. These include dealing with different flags like &#8216;-p&#8217;, &#8216;-n&#8217;, and &#8216;-0&#8217;. These flags can modify the behavior of the <code>xargs<\/code> command, making it even more powerful and flexible.<\/p>\n<p>Before we dive into the advanced usage of <code>xargs<\/code>, let&#8217;s familiarize ourselves with some of the command-line arguments or flags that can modify the behavior of the <code>xargs<\/code> command. Here&#8217;s a table with some of the most commonly used <code>xargs<\/code> arguments.<\/p>\n<table>\n<thead>\n<tr>\n<th>Flag<\/th>\n<th>Description<\/th>\n<th>Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>-p<\/code><\/td>\n<td>Prompts the user before executing each command.<\/td>\n<td><code>echo 'apple orange banana' | xargs -p rm<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-n<\/code><\/td>\n<td>Limits the number of items for each command.<\/td>\n<td><code>echo 'apple orange banana' | xargs -n 2 echo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-0<\/code><\/td>\n<td>Handles inputs with spaces or newlines.<\/td>\n<td><code>find . -name '*.txt' -print0 | xargs -0 rm<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-t<\/code><\/td>\n<td>Prints the command to STDERR before executing it.<\/td>\n<td><code>echo 'apple orange banana' | xargs -t rm<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-I<\/code><\/td>\n<td>Replaces occurrences of {} in the initial-arguments with names read from standard input.<\/td>\n<td><code>echo 'apple orange banana' | xargs -I {} echo 'Fruit name: {}'<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-l<\/code><\/td>\n<td>Limits the number of lines for each command.<\/td>\n<td><code>echo -e 'apple \\norange \\nbanana' | xargs -l echo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-r<\/code><\/td>\n<td>Does not run the command if the standard input does not contain any nonblanks.<\/td>\n<td><code>echo 'apple orange banana' | xargs -r rm<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-a<\/code><\/td>\n<td>Reads items from a file instead of standard input.<\/td>\n<td><code>xargs -a file.txt rm<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-d<\/code><\/td>\n<td>Uses a custom delimiter for input items.<\/td>\n<td><code>echo 'apple,orange,banana' | xargs -d ',' echo<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>-x<\/code><\/td>\n<td>Exits if the size is exceeded.<\/td>\n<td><code>echo 'apple orange banana' | xargs -x rm<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Now that we have a basic understanding of <code>xargs<\/code> command line arguments, let&#8217;s dive deeper into its advanced use.<\/p>\n<h3>Using the &#8216;-p&#8217; Flag<\/h3>\n<p>The &#8216;-p&#8217; flag prompts the user before executing each command. This can be useful when you want to have a final check before committing to potentially destructive operations.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo 'apple orange banana' | xargs -p rm\n\n# Output:\n# rm apple orange banana ?...\n<\/code><\/pre>\n<p>In this example, <code>xargs<\/code> asks for confirmation before deleting the files named &#8216;apple&#8217;, &#8216;orange&#8217;, and &#8216;banana&#8217;. You can respond with &#8216;y&#8217; to proceed or &#8216;n&#8217; to abort.<\/p>\n<h3>Using the &#8216;-n&#8217; Flag<\/h3>\n<p>The &#8216;-n&#8217; flag limits the number of items for each command. This can be handy when you want to process items in smaller batches.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo 'apple orange banana' | xargs -n 2 echo\n\n# Output:\n# apple orange\n# banana\n<\/code><\/pre>\n<p>In this example, <code>xargs<\/code> processes the items two at a time. This results in two separate <code>echo<\/code> commands, one for &#8216;apple&#8217; and &#8216;orange&#8217;, and another for &#8216;banana&#8217;.<\/p>\n<h3>Using the &#8216;-0&#8217; Flag<\/h3>\n<p>The &#8216;-0&#8217; flag is useful when dealing with inputs that contain spaces or newlines. It tells <code>xargs<\/code> to use the null character as a delimiter instead of whitespace.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">find . -name '*.txt' -print0 | xargs -0 rm\n\n# Output:\n# (Removes all .txt files in the current directory and its subdirectories)\n<\/code><\/pre>\n<p>In this example, <code>find<\/code> outputs the names of all .txt files in the current directory and its subdirectories, separated by null characters. <code>xargs<\/code> then reads these names and uses them as arguments for the <code>rm<\/code> command, effectively deleting all .txt files.<\/p>\n<p>These are just a few examples of the advanced usage of the <code>xargs<\/code> command in Linux. By understanding and using these flags, you can harness the full power of <code>xargs<\/code> and handle large numbers of arguments efficiently.<\/p>\n<h2>Alternative Methods to Handle Large Numbers of Arguments<\/h2>\n<p>While <code>xargs<\/code> is a powerful tool for managing numerous arguments, it&#8217;s not the only game in town. Linux provides other commands that can handle large numbers of arguments, such as &#8216;find -exec&#8217; and &#8216;parallel&#8217;. Let&#8217;s explore these alternative methods and how they compare to <code>xargs<\/code>.<\/p>\n<h3>Using &#8216;find -exec&#8217; Instead of &#8216;xargs&#8217;<\/h3>\n<p>The &#8216;find -exec&#8217; command is a common alternative to <code>xargs<\/code>. It allows you to execute a command on each file found by the <code>find<\/code> command.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">find . -name '*.txt' -exec rm {} \\;\n\n# Output:\n# (Removes all .txt files in the current directory and its subdirectories)\n<\/code><\/pre>\n<p>In this example, <code>find<\/code> locates all .txt files in the current directory and its subdirectories. The <code>-exec<\/code> option then executes the <code>rm<\/code> command on each file found, effectively deleting all .txt files. The <code>{}<\/code> symbol is replaced by each file found, and the <code>\\;<\/code> symbol signifies the end of the <code>-exec<\/code> command.<\/p>\n<p>While &#8216;find -exec&#8217; can be a powerful tool, it&#8217;s generally slower than <code>xargs<\/code> because it spawns a new process for each file found. However, it handles filenames with special characters better than <code>xargs<\/code>.<\/p>\n<h3>Using &#8216;parallel&#8217; Instead of &#8216;xargs&#8217;<\/h3>\n<p>The &#8216;parallel&#8217; command is another alternative to <code>xargs<\/code>. It can run jobs in parallel, which can significantly speed up the processing time when dealing with a large number of arguments.<\/p>\n<p>Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo 'apple orange banana' | parallel echo\n\n# Output:\n# apple\n# orange\n# banana\n<\/code><\/pre>\n<p>In this example, <code>parallel<\/code> processes the items in parallel, resulting in three separate <code>echo<\/code> commands, one for each fruit name. This can be much faster than <code>xargs<\/code> or &#8216;find -exec&#8217; when dealing with a large number of items.<\/p>\n<p>However, &#8216;parallel&#8217; is not installed by default on most Linux systems, so you might need to install it manually. It also has a more complex syntax and a steeper learning curve than <code>xargs<\/code>.<\/p>\n<p>In conclusion, while <code>xargs<\/code> is a powerful tool for managing large numbers of arguments, there are alternatives like &#8216;find -exec&#8217; and &#8216;parallel&#8217; that can be more suitable depending on your specific needs. We recommend experimenting with these tools and finding the one that works best for you.<\/p>\n<h2>Navigating xargs Pitfalls: Troubleshooting and Considerations<\/h2>\n<p>As with any command, using <code>xargs<\/code> can sometimes lead to unexpected results or errors. This is especially true when dealing with a large number of arguments or arguments with special characters. In this section, we&#8217;ll discuss some common issues you might encounter when using the <code>xargs<\/code> command in Linux and how to resolve them.<\/p>\n<h3>The &#8216;Argument List Too Long&#8217; Error<\/h3>\n<p>One common issue when using <code>xargs<\/code> is the &#8216;Argument list too long&#8217; error. This error occurs when the number of arguments or the total length of the arguments exceeds the system&#8217;s limit.<\/p>\n<p>If you encounter this error, you can use the <code>-n<\/code> option to limit the number of arguments for each command. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo {1..10000} | xargs -n 100 echo\n\n# Output:\n# (Prints the numbers from 1 to 10000, 100 numbers at a time)\n<\/code><\/pre>\n<p>In this example, <code>xargs<\/code> processes the numbers from 1 to 10000, 100 numbers at a time. This prevents the &#8216;Argument list too long&#8217; error by ensuring that the number of arguments for each <code>echo<\/code> command does not exceed 100.<\/p>\n<h3>Problems with Special Characters<\/h3>\n<p>Another common issue when using <code>xargs<\/code> is dealing with arguments that contain special characters like spaces or newlines. By default, <code>xargs<\/code> uses whitespace as a delimiter, which can lead to unexpected results if your arguments contain spaces.<\/p>\n<p>To handle inputs with spaces or newlines, you can use the <code>-0<\/code> option and pair it with <code>find -print0<\/code> or <code>echo -e<\/code> with a null character as a delimiter. Here&#8217;s an example:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e 'apple\\0orange\\0banana' | xargs -0 echo\n\n# Output:\n# apple orange banana\n<\/code><\/pre>\n<p>In this example, <code>echo -e<\/code> outputs the string &#8216;apple\\0orange\\0banana&#8217;, with the <code>\\0<\/code> symbol representing a null character. <code>xargs -0<\/code> then reads these items as separate arguments, correctly handling the spaces.<\/p>\n<p>By understanding these common issues and their solutions, you can use the <code>xargs<\/code> command more effectively and avoid common pitfalls.<\/p>\n<h2>Decoding Linux Command Line, Standard Input, and Arguments<\/h2>\n<p>To fully comprehend the <code>xargs<\/code> command in Linux, it&#8217;s crucial to understand some fundamental concepts: the Linux command line, standard input, and arguments.<\/p>\n<h3>Understanding the Linux Command Line<\/h3>\n<p>The Linux command line, also known as the terminal or shell, is a powerful interface that allows you to interact with your computer&#8217;s operating system. It enables you to run commands, manipulate files, and perform various other tasks.<\/p>\n<p>Here&#8217;s an example of using the command line to list the contents of a directory:<\/p>\n<pre><code class=\"language-bash line-numbers\">ls\n\n# Output:\n# file1.txt file2.txt directory1 directory2\n<\/code><\/pre>\n<p>In this example, the <code>ls<\/code> command lists the contents of the current directory, including files and subdirectories.<\/p>\n<h3>Grasping the Concept of Standard Input<\/h3>\n<p>Standard input, often abbreviated as stdin, is a fundamental concept in Linux and other Unix-like operating systems. It refers to the way that a program receives data.<\/p>\n<p>By default, standard input is the keyboard. However, you can redirect standard input to come from a file or another command using pipes (<code>|<\/code>) or redirection operators (&#8220;).<\/p>\n<p>Here&#8217;s an example of using a pipe to redirect the standard input of the <code>sort<\/code> command:<\/p>\n<pre><code class=\"language-bash line-numbers\">echo -e 'orange\napple\nbanana' | sort\n\n# Output:\n# apple\n# banana\n# orange\n<\/code><\/pre>\n<p>In this example, the <code>echo -e<\/code> command outputs the names of three fruits, one per line. The pipe (<code>|<\/code>) then redirects this output to the <code>sort<\/code> command, which sorts the names in alphabetical order.<\/p>\n<h3>Unpacking the Idea of Arguments<\/h3>\n<p>In the context of Linux commands, an argument is a piece of data provided to a command. Arguments can be options (which modify the behavior of a command) or operands (which are the subjects of the command).<\/p>\n<p>Here&#8217;s an example of using arguments with the <code>ls<\/code> command:<\/p>\n<pre><code class=\"language-bash line-numbers\">ls -l \/home\n\n# Output:\n# total 0\n# drwxr-xr-x 1 root root 4096 Dec 25 00:00 user1\n# drwxr-xr-x 1 root root 4096 Dec 25 00:00 user2\n<\/code><\/pre>\n<p>In this example, <code>-l<\/code> is an option that tells <code>ls<\/code> to use a long listing format, and <code>\/home<\/code> is an operand that specifies the directory to list.<\/p>\n<p>By understanding these fundamental concepts, you can gain a deeper understanding of how the <code>xargs<\/code> command works. In the next sections, we&#8217;ll explore more advanced topics and practical examples of using <code>xargs<\/code> in Linux.<\/p>\n<h2>Broadening Your xargs Horizons: Scripting, Automation, and File Handling<\/h2>\n<p>The <code>xargs<\/code> command, while powerful in its own right, is just one tool in the vast toolbox of Linux commands. Its real power shines when combined with other commands and used in scripts to automate complex tasks.<\/p>\n<h3>The Role of xargs in Scripting<\/h3>\n<p>Scripting is an essential part of any Linux user&#8217;s skill set. It allows you to automate repetitive tasks, making your work more efficient. The <code>xargs<\/code> command can be a valuable tool in your scripting arsenal, as it allows you to handle large numbers of arguments efficiently.<\/p>\n<p>Here&#8217;s an example of using <code>xargs<\/code> in a script to delete all .txt files in a directory:<\/p>\n<pre><code class=\"language-bash line-numbers\">#!\/bin\/bash\n\nfind . -name '*.txt' -print0 | xargs -0 rm\n\n# Output:\n# (Removes all .txt files in the current directory and its subdirectories)\n<\/code><\/pre>\n<p>In this script, <code>find<\/code> locates all .txt files in the current directory and its subdirectories. The <code>-print0<\/code> option outputs the names of the files, separated by null characters. <code>xargs -0<\/code> then reads these names and uses them as arguments for the <code>rm<\/code> command, effectively deleting all .txt files.<\/p>\n<h3>xargs in Automation and File Handling<\/h3>\n<p>Automation is another area where <code>xargs<\/code> can be incredibly useful. By combining <code>xargs<\/code> with commands like <code>find<\/code>, <code>grep<\/code>, or <code>awk<\/code>, you can automate complex tasks like file searching, text processing, or batch renaming.<\/p>\n<p>Here&#8217;s an example of using <code>xargs<\/code> to rename all .txt files in a directory to .bak:<\/p>\n<pre><code class=\"language-bash line-numbers\">ls *.txt | xargs -n1 bash -c 'mv $0 ${0%.txt}.bak'\n\n# Output:\n# (Renames all .txt files in the current directory to .bak)\n<\/code><\/pre>\n<p>In this example, <code>ls *.txt<\/code> lists all .txt files in the current directory. <code>xargs -n1<\/code> then takes each filename and uses it as an argument for the <code>bash -c 'mv $0 ${0%.txt}.bak'<\/code> command, effectively renaming each .txt file to .bak.<\/p>\n<h3>Further Resources for Mastering xargs<\/h3>\n<p>If you&#8217;re interested in learning more about the <code>xargs<\/code> command and related concepts like shell scripting and process management, here are some resources that can help you deepen your understanding:<\/p>\n<ol>\n<li><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.gnu.org\/software\/findutils\/manual\/html_node\/find_html\/xargs-options.html\" target=\"_blank\" rel=\"noopener\">GNU xargs manual<\/a>: The official GNU manual for <code>xargs<\/code> provides a comprehensive overview of the command and its options.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/linuxcommandlibrary.com\/man\/xargs\" target=\"_blank\" rel=\"noopener\">Linux Command Library<\/a>: This online library offers a detailed explanation of the <code>xargs<\/code> command and its usage examples.<\/p>\n<\/li>\n<li>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/linuxize.com\/post\/linux-xargs-command\/\" target=\"_blank\" rel=\"noopener\">Linuxize xargs Tutorial<\/a>: This tutorial provides a beginner-friendly introduction to <code>xargs<\/code>, complete with examples and explanations.<\/p>\n<\/li>\n<\/ol>\n<p>Remember, mastering a command like <code>xargs<\/code> takes practice. Don&#8217;t be afraid to experiment with different options and see how they affect the command&#8217;s behavior. Happy scripting!<\/p>\n<h2>Wrapping Up: Linux xargs Command Guide<\/h2>\n<p>In this comprehensive guide, we&#8217;ve delved into the depths of the <code>xargs<\/code> command in Linux, a powerful tool for managing and processing large numbers of arguments.<\/p>\n<p>We embarked on this journey with the basics, understanding how <code>xargs<\/code> reads items from standard input and executes a command for each item. We then navigated through the more advanced usage of <code>xargs<\/code>, learning how to handle different inputs and flags for efficient argument management.<\/p>\n<p>Along the way, we tackled common challenges that you might encounter when using <code>xargs<\/code>, such as the &#8216;Argument list too long&#8217; error and problems with special characters. For each issue, we provided solutions and workarounds, empowering you to use <code>xargs<\/code> more effectively.<\/p>\n<p>We also explored alternative methods for handling large numbers of arguments, such as &#8216;find -exec&#8217; and &#8216;parallel&#8217;. These tools, while different from <code>xargs<\/code>, offer their own advantages and can be more suitable depending on your specific needs. Here&#8217;s a quick comparison of these methods:<\/p>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Pros<\/th>\n<th>Cons<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>xargs<\/td>\n<td>Efficiently handles large numbers of arguments<\/td>\n<td>Struggles with special characters<\/td>\n<\/tr>\n<tr>\n<td>find -exec<\/td>\n<td>Handles filenames with special characters<\/td>\n<td>Slower than xargs<\/td>\n<\/tr>\n<tr>\n<td>parallel<\/td>\n<td>Runs jobs in parallel for faster processing<\/td>\n<td>Not installed by default on most Linux systems<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Whether you&#8217;re a beginner just starting out with <code>xargs<\/code> or an experienced user looking to deepen your understanding, we hope this guide has provided you with valuable insights and practical knowledge about the <code>xargs<\/code> command in Linux.<\/p>\n<p>With its robust capabilities and wide range of applications, from scripting and automation to file handling, <code>xargs<\/code> is a tool that can greatly enhance your command-line efficiency. Keep practicing, keep experimenting, and happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever found yourself overwhelmed with handling a large number of arguments in Linux? You&#8217;re not alone. Many developers find themselves in a maze when it comes to managing and processing a multitude of arguments. But, like a skilled juggler, the xargs tool in Linux can make this process a breeze. This command is a powerful [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14453,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[124,3,9],"tags":[],"class_list":["post-6535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","category-linux","category-sysadmin","cat-124-id","cat-3-id","cat-9-id","has_thumb"],"_links":{"self":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/comments?post=6535"}],"version-history":[{"count":6,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6535\/revisions"}],"predecessor-version":[{"id":14546,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/posts\/6535\/revisions\/14546"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media\/14453"}],"wp:attachment":[{"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/media?parent=6535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/categories?post=6535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ioflood.com\/blog\/wp-json\/wp\/v2\/tags?post=6535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}