

{"id":111925,"date":"2023-02-16T09:00:06","date_gmt":"2023-02-16T03:30:06","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=111925"},"modified":"2023-02-16T09:33:48","modified_gmt":"2023-02-16T04:03:48","slug":"input-output-redirection-in-linux","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/","title":{"rendered":"Input Output Redirection in Linux"},"content":{"rendered":"<p>Input Output Redirection in Linux is one of the most interesting and important topics, it is this feature that allows you to redirect the input and\/or output of commands. In this article, you will learn all about the redirection of output and input in Linux-based operating systems. So pay attention, grab a snack if you need, and read right till the end.<\/p>\n<h3>What is Input Output Redirection in Linux?<\/h3>\n<p>First of all, I\/O is the abbreviation for input\/output. In Linux-based operating systems, I\/O redirection is the ability of the operating system that allows us to change the STDIN (standard input) and STDOUT (standard output) while executing commands in the terminal.<\/p>\n<p>We all know that the STDIN device is your keyboard and the STDOUT device is your screen &#8211; at least for the terminal. The term redirection in computer language refers to the way from where commands read input to where commands send output.<\/p>\n<p>There are hundreds of shell commands, and every single one of them does one of the following &#8211; take input, give output or do both. With the help of the special redirection characters, we can redirect these input and output functionalities.<\/p>\n<p>Let us understand this better with an example. Say we run any arbitrary command in the terminal that will print the output on the terminal screen. But, we don\u2019t want the output printed on the terminal, instead, we<br \/>\nwant to save it into a file, using the redirection operator we can do exactly that. To sum up in one line, redirecting simply means diverting the input or output.<\/p>\n<p>Similarly, if we have another random command that needs to be given an input. But instead of giving the input directly, we want it to be taken from a specific file called \u201cfile.txt\u201d. To do the same, we simply make use of the redirecting operator. In this article, we will look at how to make use of it in multiple ways to redirect input and output.<\/p>\n<h3>Linux I\/O Redirection Terminologies<\/h3>\n<p>Before we proceed further and look at how to use the redirection operator, let us familiarize ourselves with some terminology of the standard streams of the input\/output redirection.<\/p>\n<p><strong>1. STDIN<\/strong><\/p>\n<p>STDIN stands for standard input. The bash shell takes input from the STDIN. The standard input stream is numbered as stdin(0). It is connected to the keyboard.<\/p>\n<p><strong>2. STDOUT<\/strong><\/p>\n<p>STDOUT stands for standard output. The bash shell sends output to the STDOUT. The standard output stream is numbered as stdout(1). It is connected to the screen.<\/p>\n<p><strong>3. STDERR<\/strong><\/p>\n<p>STDERR stands for standard error. The bash shell sends the error messages to STDERR. The standard error stream is numbered as stderr(2). It is connected to the screen.<\/p>\n<p>These are the 3 streams that come into the picture when we talk about input\/output redirection.<\/p>\n<h3>Types of redirection operators in Linux<\/h3>\n<p>Before we look at how to use the redirection operator is important to understand how to combine the redirection operator to perform different actions.<\/p>\n<p>1. Overwrite<\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201c&gt;\u201d &#8211; standard input<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201c&lt;\u201d &#8211; standard output<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">2. Appends<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201c&gt;&gt;\u201d &#8211; standard output<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201c&lt;&lt;\u201d &#8211; standard output<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-weight: 400\">3. Merge<\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201cp&gt;&amp;q\u201d &#8211; merge output from stream p with stream q<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u201cp&gt;&amp;q\u201d &#8211; merge input from stream p with stream q<\/span><\/li>\n<\/ul>\n<p>Now that we have covered the basics, let us look at some beautiful practical examples of the redirection command in the terminal.<\/p>\n<h3>Redirecting STDOUT<\/h3>\n<p>We know that the \u201ctop\u201d command will print all the details of the process happening on the computer, when we run the top command on its own, it will print its output on the screen, but if we want to redirect the output and save it into a file, we can use the redirector operator as shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">top -bn 5 &gt;top.log<\/pre>\n<p>Let us take a closer look at the command mentioned above:<\/p>\n<p>The top command is followed by the 2 options: \u201c-b\u201d which enables the top to run in batch mode, so that you can redirect its output to a file or another command, and the option \u201c-n\u201d which specifies the number of iterations before the command terminates. Now if we open the file \u201ctop.log\u201d (where the output of the top command is saved) using \u201ccat\u201d, we get the output shown below:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdout.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112160\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdout.webp\" alt=\"redirecting stdout\" width=\"780\" height=\"758\" \/><\/a><\/p>\n<h3>Appending STDOUT<\/h3>\n<p>We saw earlier that if we want to append the STDOUT we use the operator \u201c&gt;&gt;\u201d. When we use this operator, it will not overwrite the entire content that already exists in the file, it instead appends the content at the end of the already existing content of the file. We can use the redirecting operator as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">top -bn 5 &gt;&gt;top.log<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112161\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout.webp\" alt=\"appending stdout\" width=\"502\" height=\"53\" \/><\/a><\/p>\n<p>Similarly, we can also use the stream number, as stdin stands for (1) as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">top -bn 5 1&gt;top.log<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout-using-stream-number.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112162\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout-using-stream-number.webp\" alt=\"appending stdout using stream number\" width=\"500\" height=\"58\" \/><\/a><\/p>\n<h3>Redirecting STDERR<\/h3>\n<p>To redirect the standard error of a command to a file you need to explicitly specify the file descriptor number, 2 for the shell to understand that you are redirecting the standard error [stderr(2)]<\/p>\n<p>Let us take the simple example of listing the contents of the root directory, for which you either need to be a root user or need sudo privileges, else you will get an error saying \u201cpermission denied\u201d<\/p>\n<p>To redirect this error message into a file called \u201cls-error.log\u201d use the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ls -l \/root\/ 2&gt;ls-error.log<\/pre>\n<p>Once you have successfully redirected the stderr into the file, you can open it using the \u201ccat\u201d command as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cat ls-error.log<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stderr.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112163\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stderr.webp\" alt=\"redirecting stderr\" width=\"628\" height=\"147\" \/><\/a><\/p>\n<h3>Appending STDERR<\/h3>\n<p>To append and not overwrite the error message into the file, we use the \u201c&gt;&gt;\u201d operator as shown below:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stderr.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112164\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stderr.webp\" alt=\"appending stderr\" width=\"632\" height=\"169\" \/><\/a><\/p>\n<p>Notice that the first time I opened the file, there was only one error message, but since I appended another error message, there are now 2 error messages in the file.<\/p>\n<h3>Redirecting STDOUT\/STDERR<\/h3>\n<p>We can also capture all the output of a command (both standard output and standard error) into the specified file, in fact, there are 2 methods to do this, let us look at both:<\/p>\n<p>1. The first method is a relatively old method, it goes as shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ls -l \/root\/ &gt;ls-error.log 2&gt;&amp;1<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdout-stderr.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112165\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdout-stderr.webp\" alt=\"redirecting stdout stderr\" width=\"638\" height=\"102\" \/><\/a><\/p>\n<p>Before we proceed to the second method, let us take a moment to understand how the command shown above works. The command will first send the output of the \u201cls\u201d command to the file ls-error.log and then writes all error messages to the file descriptor 2, which is nothing but standard output It does this as it has been redirected to the file ls-error.log using the \u201c2&gt;&amp;1\u201d operator. Hence the standard error and standard output are both sent to the same file.<\/p>\n<p>2. The second method is pretty direct and self-explanatory:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/another-method-of-redirecting-stdout-stderr.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112167\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/another-method-of-redirecting-stdout-stderr.webp\" alt=\"another method of redirecting stdout stderr\" width=\"625\" height=\"99\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Appending STDOUT\/STDERR<\/h3>\n<p>If you want to append the output and error messages in the file and not overwrite them each time use the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">ls -l \/root\/ &amp;&gt;&gt;ls-error.log<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout-stderr.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112168\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/appending-stdout-stderr.webp\" alt=\"appending stdout stderr\" width=\"628\" height=\"165\" \/><\/a><\/p>\n<h3>Redirecting STDIN<\/h3>\n<p>95% of all shell commands get their outputs from the standard input, and the standard input is connected to the keyboard. To redirect input use the \u201c&lt;\u201d operator<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdin.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112169\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdin.webp\" alt=\"redirecting stdin\" width=\"728\" height=\"120\" \/><\/a><\/p>\n<h3>Redirecting STDIN\/STDOUT to a file<\/h3>\n<p>If you want to redirect STDIN and then redirect the STDOUT to a file, we make use of both \u201c&lt;\u201d and \u201c&gt;\u201d operators. For example, if we want to sort the contents of a file and then save the output of it as a file, use the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sort &lt;domains.list &gt;sort.output<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdin-stdout-to-a-file.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112166\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/redirecting-stdin-stdout-to-a-file.webp\" alt=\"redirecting stdin stdout to a file\" width=\"734\" height=\"146\" \/><\/a><\/p>\n<p>In the command shown above, the sort command takes the input from the file \u201cubuntu.txt\u201d, sorts it alphabetically, and then redirects the output to the file \u201csort.output\u201d<\/p>\n<h3>I\/O redirection using pipes<\/h3>\n<p>We can also redirect the output of one command as the input of the other command using pipes, we can use this technique for complex operations.<\/p>\n<p>For example, the command shown below will list the last 5 recently modifies files.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/io-redirection-using-pipes.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-112170\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/io-redirection-using-pipes.webp\" alt=\"io redirection using pipes\" width=\"780\" height=\"156\" \/><\/a><\/p>\n<p>Before we proceed further, let us look at the command shown above in slightly more depth. With the \u201cls\u201d command the option \u201c -l\u201d enables long listing format and the option \u201c-t\u201d sorts the files with respect to the modification time.<\/p>\n<p>The option \u201c-n\u201d used with the \u201chead\u201d command will print out the first \u201cn\u201d number of lines. In the above command, the output of the \u201cls\u201d command was taken as the input of the \u201chead\u201d command.<\/p>\n<p>Another example of redirecting using piping is shown below:<\/p>\n<p>#image#<\/p>\n<p>In the above example, we piped the echo command with the tee command which reads from standard input and writes to standard output and files.<\/p>\n<h3>Summary<\/h3>\n<p>As you have seen, the redirecting operator is really simple and helps us do complex tasks in just one line of command, You have now learned how to redirect and append using the redirecting operator apart from the different terminology and types of redirection. In the end, we have also seen how to redirect STDIN and STDOUT using pipes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Input Output Redirection in Linux is one of the most interesting and important topics, it is this feature that allows you to redirect the input and\/or output of commands. In this article, you will&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":112159,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[27249],"class_list":["post-111925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-input-output-redirection-in-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Input Output Redirection in Linux - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn about the Input Output Redirection in Linux. See how to redirect and append using redirecting operator and types of redirection.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Input Output Redirection in Linux - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn about the Input Output Redirection in Linux. See how to redirect and append using redirecting operator and types of redirection.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-16T03:30:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-16T04:03:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Input Output Redirection in Linux - DataFlair","description":"Learn about the Input Output Redirection in Linux. See how to redirect and append using redirecting operator and types of redirection.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"Input Output Redirection in Linux - DataFlair","og_description":"Learn about the Input Output Redirection in Linux. See how to redirect and append using redirecting operator and types of redirection.","og_url":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-02-16T03:30:06+00:00","article_modified_time":"2023-02-16T04:03:48+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Input Output Redirection in Linux","datePublished":"2023-02-16T03:30:06+00:00","dateModified":"2023-02-16T04:03:48+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/"},"wordCount":1445,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp","keywords":["Input Output Redirection in Linux"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/","url":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/","name":"Input Output Redirection in Linux - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp","datePublished":"2023-02-16T03:30:06+00:00","dateModified":"2023-02-16T04:03:48+00:00","description":"Learn about the Input Output Redirection in Linux. See how to redirect and append using redirecting operator and types of redirection.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/02\/input-output-redirection-in-linux.webp","width":1200,"height":628,"caption":"input output redirection in linux"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/input-output-redirection-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"Input Output Redirection in Linux"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=111925"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111925\/revisions"}],"predecessor-version":[{"id":112173,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111925\/revisions\/112173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/112159"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=111925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=111925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=111925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}