﻿{"id":12918,"date":"2022-02-08T08:27:06","date_gmt":"2022-02-08T00:27:06","guid":{"rendered":"https:\/\/www.linuxmi.com\/?p=12918"},"modified":"2023-06-22T09:24:25","modified_gmt":"2023-06-22T01:24:25","slug":"shell-script-10","status":"publish","type":"post","link":"https:\/\/www.linuxmi.com\/shell-script-10.html","title":{"rendered":"10 \u4e2a\u5b9e\u7528 Shell \u811a\u672c\uff0c\u73cd\u85cf\u7248"},"content":{"rendered":"<p>\u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u6211\u4eec\u4f1a\u7ecf\u5e38\u7f16\u5199\u4e00\u4e9b Shell \u547d\u4ee4\u6216\u811a\u672c\u5e2e\u6211\u4eec\u7684\u5de5\u4f5c\uff0c\u672c\u6587\u5206\u4eab\u4e86\u6700\u8fd1\u7528\u5230\u7684\u51e0\u4f8bshell\u5b9e\u7528\u811a\u672c\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u8ddf\u968f\u5c0f\u7f16\u4e00\u8d77\u770b\u770b\u5427\u3002<\/p>\n<p>\u5f88\u591a\u4eba\u8ba4\u4e3a Shell \u811a\u672c\u7b80\u5355\uff0c\u4f46\u5176\u5b9e Shell \u5c0f\u811a\u672c\u5374\u6709\u5927\u667a\u6167\u3002\u522b\u5c0f\u770b\u51e0\u5341\u884c\u4ee3\u7801\uff0c\u5b83\u5939\u6742\u7740\u7cfb\u7edf\u8bbe\u8ba1\u3001\u4ee3\u7801\u89c4\u8303\u548c\u64cd\u4f5c\u7ecf\u9a8c\u7b49\u7b49\u7ec6\u8282\uff0c\u5728\u5efa\u8bbe\u81ea\u52a8\u5316\u8fd0\u7ef4\u7684\u5de5\u4f5c\u4e2d\uff0c\u8fd8\u662f\u5f88\u503c\u5f97\u6211\u4eec\u7814\u7a76\u5b66\u4e60\u7684\u3002<\/p>\n<p><strong>\u7f16\u5199\u811a\u672c\u7684\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong><\/p>\n<ol>\n<li>\u5f00\u5934\u52a0\u89e3\u91ca\u5668\uff1a#!\/bin\/bash<\/li>\n<li>\u8bed\u6cd5\u7f29\u8fdb\uff0c\u4f7f\u7528\u56db\u4e2a\u7a7a\u683c\uff1b\u591a\u52a0\u6ce8\u91ca\u8bf4\u660e\u3002<\/li>\n<li>\u547d\u540d\u5efa\u8bae\u89c4\u5219\uff1a\u53d8\u91cf\u540d\u5927\u5199\u3001\u5c40\u90e8\u53d8\u91cf\u5c0f\u5199\uff0c\u51fd\u6570\u540d\u5c0f\u5199\uff0c\u540d\u5b57\u4f53\u73b0\u51fa\u5b9e\u9645\u4f5c\u7528\u3002<\/li>\n<li>\u9ed8\u8ba4\u53d8\u91cf\u662f\u5168\u5c40\u7684\uff0c\u5728\u51fd\u6570\u4e2d\u53d8\u91cflocal\u6307\u5b9a\u4e3a\u5c40\u90e8\u53d8\u91cf\uff0c\u907f\u514d\u6c61\u67d3\u5176\u4ed6\u4f5c\u7528\u57df\u3002<\/li>\n<li>\u6709\u4e24\u4e2a\u547d\u4ee4\u80fd\u5e2e\u52a9\u6211\u8c03\u8bd5\u811a\u672c\uff1aset -e \u9047\u5230\u6267\u884c\u975e0\u65f6\u9000\u51fa\u811a\u672c\uff0cset-x \u6253\u5370\u6267\u884c\u8fc7\u7a0b\u3002<\/li>\n<li>\u5199\u811a\u672c\u4e00\u5b9a\u5148\u6d4b\u8bd5\u518d\u5230\u751f\u4ea7\u4e0a\u3002<\/li>\n<\/ol>\n<p><strong>1\u3001\u5907\u4efd\u5f53\u524d\u65e5\u671f\u6587\u4ef6<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\n#\u4e00\u6708\u524d\r\nhistoryTime=$(date \"+%Y-%m-%d %H\" -d '1 month ago')\r\necho ${historyTime}\r\nhistoryTimeStamp=$(date -d \"$historyTime\" +%s)\r\necho ${historyTimeStamp}\r\n \r\n#\u4e00\u5468\u524d\r\n$(date \"+%Y-%m-%d %H\" -d '7 day ago')\r\n \r\n#\u672c\u6708\u4e00\u6708\u4e00\u65e5\r\ndate_this_month=`date +%Y%m01`\r\n \r\n#\u4e00\u5929\u524d\r\ndate_today=`date -d '1 day ago' +%Y%m%d`\r\n \r\n#\u4e00\u5c0f\u65f6\u524d\r\n$(date \"+%Y-%m-%d %H\" -d '-1 hours')<\/code><\/pre>\n<p><strong>2\u3001DOS\u653b\u51fb\u9632\u8303\uff08\u81ea\u52a8\u5c4f\u853d\u653b\u51fbIP\uff09<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\nDATE=$(date +%d\/%b\/%Y:%H:%M)\r\n#nginx\u65e5\u5fd7\r\nLOG_FILE=\/usr\/local\/nginx\/logs\/demo2.access.log\r\n#\u5206\u6790ip\u7684\u8bbf\u95ee\u60c5\u51b5\r\nABNORMAL_IP=$(tail -n5000 $LOG_FILE |grep $DATE |awk '{a[$1]++}END{for(i in a)if(a[i]&gt;10)print i}')\r\nfor IP in $ABNORMAL_IP; do\r\n    if [ $(iptables -vnL |grep -c \"$IP\") -eq 0 ]; then\r\n        iptables -I INPUT -s $IP -j DROP\r\n        echo \"$(date +'%F_%T') $IP\" &gt;&gt; \/tmp\/drop_ip.log\r\n    fi\r\ndone<\/code><\/pre>\n<p><strong>3\u3001\u6279\u91cf\u521b\u5efa\u591a\u5c11\u4e2a\u7528\u6237\u5e76\u8bbe\u7f6e\u5bc6\u7801<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\nUSER_LIST=$@\r\nUSER_FILE=.\/user.info\r\nfor USER in $USER_LIST;do\r\n  if ! id $USER &amp;&gt;\/dev\/null; then\r\n    PASS=$(echo $RANDOM |md5sum |cut -c 1-8)\r\n    useradd $USER\r\n    echo $PASS | passwd --stdin $USER &amp;&gt;\/dev\/null\r\n    echo \"$USER   $PASS\" &gt;&gt; $USER_FILE\r\n    echo \"$USER User create successful.\"\r\n  else\r\n    echo \"$USER User already exists!\"\r\n  fi\r\ndone<\/code><\/pre>\n<p><strong>4\u3001\u5feb\u901f\u5728Ubuntu 20.04\u4e0a\u67b6\u8bbeLAMP\u670d\u52a1\u5668\u53caWordPress\u535a\u5ba2<\/strong><\/p>\n<p>\u8be6\u60c5\u89c1\uff1a<a href=\"https:\/\/www.linuxmi.com\/ubuntu-20-04-lamp-wordpress.html\">https:\/\/www.linuxmi.com\/ubuntu-20-04-lamp-wordpress.html<\/a><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#\/bin\/sh\r\n\u200b\r\ninstall_dir=\"\/var\/www\/html\"\r\n#Creating Random WP Database Credenitals\r\ndb_name=\"wp`date +%s`\"\r\ndb_user=$db_name\r\ndb_password=`date |md5sum |cut -c '1-12'`\r\nsleep 1\r\nmysqlrootpass=`date |md5sum |cut -c '1-12'`\r\nsleep 1\r\n\u200b\r\n#### Install Packages for https and mysql\r\napt -y install apache2\r\napt -y install mysql-server\r\n\u200b\r\n\u200b\r\n#### Start http\r\nrm \/var\/www\/html\/index.html\r\nsystemctl enable apache2\r\nsystemctl start apache2\r\n\u200b\r\n#### Start mysql and set root password\r\n\u200b\r\nsystemctl enable mysql\r\nsystemctl start mysql\r\n\u200b\r\n\/usr\/bin\/mysql -e \"USE mysql;\"\r\n\/usr\/bin\/mysql -e \"UPDATE user SET Password=PASSWORD($mysqlrootpass) WHERE user='root';\"\r\n\/usr\/bin\/mysql -e \"FLUSH PRIVILEGES;\"\r\ntouch \/root\/.my.cnf\r\nchmod 640 \/root\/.my.cnf\r\necho \"[client]\"&gt;&gt;\/root\/.my.cnf\r\necho \"user=root\"&gt;&gt;\/root\/.my.cnf\r\necho \"password=\"$mysqlrootpass&gt;&gt;\/root\/.my.cnf\r\n####Install PHP\r\napt -y install php\r\napt -y php-mysql \r\napt -y php-gd  \r\n\u200b\r\nsed -i '0,\/AllowOverride\\ None\/! {0,\/AllowOverride\\ None\/ s\/AllowOverride\\ None\/AllowOverride\\ All\/}' \/etc\/apache2\/apache2.conf #Allow htaccess usage\r\n\u200b\r\nsystemctl restart apache2\r\n\u200b\r\n####Download and extract latest WordPress Package\r\nif test -f \/tmp\/latest.tar.gz\r\nthen\r\necho \"WP is already downloaded.\"\r\nelse\r\necho \"Downloading WordPress\"\r\ncd \/tmp\/ &amp;&amp; wget \"http:\/\/wordpress.org\/latest.tar.gz\";\r\nfi\r\n\u200b\r\n\/bin\/tar -C $install_dir -zxf \/tmp\/latest.tar.gz --strip-components=1\r\nchown www-data: $install_dir -R\r\n\u200b\r\n#### Create WP-config and set DB credentials\r\n\/bin\/mv $install_dir\/wp-config-sample.php $install_dir\/wp-config.php\r\n\u200b\r\n\/bin\/sed -i \"s\/database_name_here\/$db_name\/g\" $install_dir\/wp-config.php\r\n\/bin\/sed -i \"s\/username_here\/$db_user\/g\" $install_dir\/wp-config.php\r\n\/bin\/sed -i \"s\/password_here\/$db_password\/g\" $install_dir\/wp-config.php\r\n\u200b\r\ncat &lt;&lt; EOF &gt;&gt; $install_dir\/wp-config.php\r\ndefine('FS_METHOD', 'direct');\r\nEOF\r\n\u200b\r\ncat &lt;&lt; EOF &gt;&gt; $install_dir\/.htaccess\r\n# BEGIN WordPress\r\n&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteBase \/\r\nRewriteRule ^index.php$ \u2013 [L]\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/index.php [L]\r\n&lt;\/IfModule&gt;\r\n# END WordPress\r\nEOF\r\n\u200b\r\nchown www-data: $install_dir -R\r\n\u200b\r\n##### Set WP Salts\r\ngrep -A50 'table_prefix' $install_dir\/wp-config.php &gt; \/tmp\/wp-tmp-config\r\n\/bin\/sed -i '\/**#@\/,\/$p\/d' $install_dir\/wp-config.php\r\n\/usr\/bin\/lynx --dump -width 200 https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/ &gt;&gt; $install_dir\/wp-config.php\r\n\/bin\/cat \/tmp\/wp-tmp-config &gt;&gt; $install_dir\/wp-config.php &amp;&amp; rm \/tmp\/wp-tmp-config -f\r\n\/usr\/bin\/mysql -u root -e \"CREATE DATABASE $db_name\"\r\n\/usr\/bin\/mysql -u root -e \"CREATE USER '$db_name'@'localhost' IDENTIFIED WITH mysql_native_password BY '$db_password';\"\r\n\/usr\/bin\/mysql -u root -e \"GRANT ALL PRIVILEGES ON $db_name.* TO '$db_user'@'localhost';\"\r\n \r\n######Display generated passwords to log file.\r\necho \"Database Name: \" $db_name\r\necho \"Database User: \" $db_user\r\necho \"Database Password: \" $db_password\r\necho \"Mysql root password: \" $mysqlrootpass<\/code><\/pre>\n<p><strong>5\u3001\u6bcf\u5929\u81ea\u52a8\u5907\u4efd MySQL \u6570\u636e\u5e93<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/sh\r\n\u200b\r\n# Database info\r\nDB_USER=\"batsing\"\r\nDB_PASS=\"batsingpw\"\r\nDB_HOST=\"localhost\"\r\nDB_NAME=\"timepusher\"\r\n\u200b\r\n# \u4e00\u4e9b\u53d8\u91cf\r\nBIN_DIR=\"\/usr\/bin\"            #mysql bin\u8def\u5f84\r\nBCK_DIR=\"\/mnt\/mysqlBackup\"    #\u5907\u4efd\u6587\u4ef6\u76ee\u5f55\r\nDATE=`date +%F`\r\n\u200b\r\n# TODO\r\n# \/usr\/bin\/mysqldump --opt -ubatsing -pbatsingpw -hlocalhost timepusher &gt; \/mnt\/mysqlBackup\/db_`date +%F`.sql\r\n$BIN_DIR\/mysqldump --opt -u$DB_USER -p$DB_PASS -h$DB_HOST $DB_NAME &gt; $BCK_DIR\/db_$DATE.sql\r\n\u200b\r\n#\u8fd8\u539f\u6570\u636e\u5e93\r\n#\u7528mysql-front\u5bfc\u5165\u524d\u4e00\u5929\u7684 *.sql \u6587\u4ef6\u5373\u53ef\u6062\u590d\u6570\u636e<\/code><\/pre>\n<p><strong>6\u3001MySQL \u6570\u636e\u5e93\u5907\u4efd\u5355\u5faa\u73af<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\nDATE=$(date +%F_%H-%M-%S)\r\nHOST=localhost\r\nUSER=backup\r\nPASS=123.com\r\nBACKUP_DIR=\/data\/db_backup\r\nDB_LIST=$(mysql -h$HOST -u$USER -p$PASS -s -e \"show databases;\" 2&gt;\/dev\/null |egrep -v \"Database|information_schema|mysql|performance_schema|sys\")\r\n\u200b\r\nfor DB in $DB_LIST; do\r\n    BACKUP_NAME=$BACKUP_DIR\/${DB}_${DATE}.sql\r\n    if ! mysqldump -h$HOST -u$USER -p$PASS -B $DB &gt; $BACKUP_NAME 2&gt;\/dev\/null; then\r\n        echo \"$BACKUP_NAME \u5907\u4efd\u5931\u8d25!\"\r\n    fi\r\ndone<\/code><\/pre>\n<p><strong>7\u3001MySQL \u6570\u636e\u5e93\u5907\u4efd\u591a\u5faa\u73af<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\nDATE=$(date +%F_%H-%M-%S)\r\nHOST=localhost\r\nUSER=backup\r\nPASS=123.com\r\nBACKUP_DIR=\/data\/db_backup\r\nDB_LIST=$(mysql -h$HOST -u$USER -p$PASS -s -e \"show databases;\" 2&gt;\/dev\/null |egrep -v \"Database|information_schema|mysql|performance_schema|sys\")\r\n\u200b\r\nfor DB in $DB_LIST; do\r\n    BACKUP_DB_DIR=$BACKUP_DIR\/${DB}_${DATE}\r\n    [ ! -d $BACKUP_DB_DIR ] &amp;&amp; mkdir -p $BACKUP_DB_DIR &amp;&gt;\/dev\/null\r\n    TABLE_LIST=$(mysql -h$HOST -u$USER -p$PASS -s -e \"use $DB;show tables;\" 2&gt;\/dev\/null)\r\n    for TABLE in $TABLE_LIST; do\r\n        BACKUP_NAME=$BACKUP_DB_DIR\/${TABLE}.sql\r\n        if ! mysqldump -h$HOST -u$USER -p$PASS $DB $TABLE &gt; $BACKUP_NAME 2&gt;\/dev\/null; then\r\n            echo \"$BACKUP_NAME \u5907\u4efd\u5931\u8d25!\"\r\n        fi\r\n    done\r\ndone<\/code><\/pre>\n<p><strong>8\u3001Nginx \u65e5\u5fd7\u6309\u8981\u6c42\u5207\u5272<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\n#\u5b89\u88c5\u76ee\u5f55\u4e0b\u65e5\u5fd7\u6587\u4ef6\r\nbase_log_path='\/usr\/local\/openresty\/nginx\/logs\/access.log'\r\nbase_error_path='\/usr\/local\/openresty\/nginx\/logs\/error.log'\r\n \r\n#\u9700\u8981\u4fdd\u5b58\u7684\u76ee\u5f55\u4f4d\u7f6e\r\nlog_path='\/data_lytdev_dir\/nginx\/logs\/'\r\n \r\n#\u83b7\u53d6\u6708\u4efd\r\nlog_month=$(date -d yesterday +\"%Y%m\")\r\n \r\n#\u83b7\u53d6\u524d\u4e00\u5929\u65e5\u671f (\u7b2c\u4e8c\u5929\u51cc\u6668\u5907\u4efd,\u5373\u4fdd\u5b58\u7684\u65e5\u5fd7\u5c31\u662f\u5f53\u5929\u65f6\u95f4\u7684\u65e5\u5fd7)\r\nlog_day=$(date -d yesterday +\"%d\")\r\n \r\n#\u5728\u6307\u5b9a\u4f4d\u7f6e\u521b\u5efa\u6587\u4ef6\u5939\r\nmkdir -p $log_path\/$log_month\r\n \r\n#\u5c06\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684\u65e5\u5fd7\u6587\u4ef6\uff0c\u79fb\u52a8\u5230\u6307\u5b9a\u5b58\u50a8\u4f4d\u7f6e\r\nmv $base_log_path $log_path\/$log_month\/access_$log_day.log\r\nmv $base_error_path $log_path\/$log_month\/error_$log_day.log\r\n \r\n#\u518d\u4f7f\u7528\u4fe1\u53f7\u63a7\u5236\u5207\u5272\u65e5\u5fd7\r\n#USR1 \u8868\u793anginx\u4fe1\u53f7\u63a7\u5236,\u5207\u5272\u65e5\u5fd7\r\nkill -USR1 `cat \/usr\/local\/openresty\/nginx\/logs\/nginx.pid`\r\n \r\n \r\n#\u6bcf\u5929\u51cc\u66681\u70b9\u5207\u5272\u65e5\u5fd7\r\n* 1 * * * \/usr\/local\/openresty\/nginx\/logs\/log_rotate.sh<\/code><\/pre>\n<p><strong>9\u3001\u751f\u621010\u4e2a\u968f\u673a\u6570\u4fdd\u5b58\u4e8e\u6570\u7ec4\u4e2d\u5e76\u627e\u51fa\u5176\u6700\u5927\u503c\u548c\u6700\u5c0f\u503c<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\ndeclare -i min max\r\ndeclare -a nums\r\nfor ((i=0;i&lt;10;i++));do\r\n    nums[$i]=$RANDOM\r\n    [ $i -eq 0 ] &amp;&amp; min=${nums[0]} &amp;&amp;  max=${nums[0]}&amp;&amp; continue\r\n    [ ${nums[$i]} -gt $max ] &amp;&amp; max=${nums[$i]}\r\n    [ ${nums[$i]} -lt $min ] &amp;&amp; min=${nums[$i]}\r\ndone\r\necho \"All numbers are ${nums[*]}\"\r\necho Max is $max\r\necho Min is $min<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12919\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2022\/02\/shell1.png\" alt=\"\" width=\"951\" height=\"695\" \/><\/p>\n<p>10\u3001\u67e5\u770b\u7f51\u5361\u5b9e\u65f6\u6d41\u91cf<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">#!\/bin\/bash\r\nNIC=$1\r\necho -e \" In ------ Out\"\r\nwhile true; do\r\n    OLD_IN=$(awk '$0~\"'$NIC'\"{print $2}' \/proc\/net\/dev)\r\n    OLD_OUT=$(awk '$0~\"'$NIC'\"{print $10}' \/proc\/net\/dev)\r\n    sleep 1\r\n    NEW_IN=$(awk  '$0~\"'$NIC'\"{print $2}' \/proc\/net\/dev)\r\n    NEW_OUT=$(awk '$0~\"'$NIC'\"{print $10}' \/proc\/net\/dev)\r\n    IN=$(printf \"%.1f%s\" \"$((($NEW_IN-$OLD_IN)\/1024))\" \"KB\/s\")\r\n    OUT=$(printf \"%.1f%s\" \"$((($NEW_OUT-$OLD_OUT)\/1024))\" \"KB\/s\")\r\n    echo \"$IN $OUT\"\r\n    sleep 1\r\ndone\r\n<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12920\" src=\"https:\/\/www.linuxmi.com\/wp-content\/uploads\/2022\/02\/shell2.png\" alt=\"\" width=\"991\" height=\"941\" \/><\/p>\n<p><strong>\u6b22\u8fce\u5728\u4e0b\u9762\u7684\u7559\u8a00\u680f\u91cc\u4e0e\u5927\u5bb6\u5206\u4eab\u4e00\u4e9b\u6709\u7528\u7684 Shell \u811a\u672c\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u6211\u4eec\u4f1a\u7ecf\u5e38\u7f16\u5199\u4e00\u4e9b Shell \u547d\u4ee4\u6216\u811a\u672c\u5e2e\u6211\u4eec\u7684\u5de5\u4f5c\uff0c\u672c\u6587\u5206\u4eab\u4e86\u6700\u8fd1\u7528\u5230\u7684\u51e0\u4f8bshe &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[154,946],"class_list":["post-12918","post","type-post","status-publish","format-standard","hentry","category-linux","tag-shell"],"aioseo_notices":[],"views":1645,"_links":{"self":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/12918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/comments?post=12918"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/12918\/revisions"}],"predecessor-version":[{"id":12921,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/posts\/12918\/revisions\/12921"}],"wp:attachment":[{"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/media?parent=12918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/categories?post=12918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxmi.com\/wp-json\/wp\/v2\/tags?post=12918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}