{"id":43609,"date":"2026-09-18T10:09:39","date_gmt":"2026-09-18T03:09:39","guid":{"rendered":"https:\/\/interdata.vn\/blog\/?p=43609"},"modified":"2026-09-18T10:10:36","modified_gmt":"2026-09-18T03:10:36","slug":"cac-lenh-quan-ly-file-linux","status":"publish","type":"post","link":"https:\/\/interdata.vn\/blog\/cac-lenh-quan-ly-file-linux\/","title":{"rendered":"15+ L\u1ec7nh Qu\u1ea3n L\u00fd File Linux Th\u00f4ng D\u1ee5ng T\u1eeb C\u01a1 B\u1ea3n \u0110\u1ebfn N\u00e2ng Cao (C\u00f3 B\u1ea3ng Tra C\u1ee9u)"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 100%;\"><strong>C\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux<\/strong> l\u00e0 th\u1ee9 b\u1ea1n ph\u1ea3i n\u1eafm tr\u01b0\u1edbc ti\u00ean khi v\u1eeba SSH v\u00e0o m\u1ed9t VPS m\u1edbi. Kh\u00f4ng bi\u1ebft g\u00f5 g\u00ec \u0111\u1ec3 t\u1ea1o file, copy, ph\u00e2n quy\u1ec1n hay t\u00ecm file th\u00ec m\u1ecdi thao t\u00e1c sau \u0111\u00f3 \u0111\u1ec1u b\u1ebf t\u1eafc. B\u00e0i n\u00e0y h\u01b0\u1edbng d\u1eabn th\u1ef1c h\u00e0nh t\u1eeb A \u0111\u1ebfn Z, c\u00f3 l\u1ec7nh ch\u1ea1y \u0111\u01b0\u1ee3c ngay tr\u00ean Ubuntu, Debian v\u00e0 CentOS, k\u00e8m c\u00e1ch x\u1eed l\u00fd nh\u1eefng l\u1ed7i th\u01b0\u1eddng g\u1eb7p. N\u1ebfu ch\u01b0a c\u00f3 server \u0111\u1ec3 th\u1ef1c h\u00e0nh, b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o <a href=\"https:\/\/interdata.vn\/\">InterData<\/a> \u0111\u1ec3 thu\u00ea VPS Linux c\u00f3 quy\u1ec1n root.<\/span><\/p>\n<div style=\"background-color: #eff6ff; padding: 20px; border: 1.5px solid #BFDBFE; border-radius: 12px; margin-bottom: 40px; box-shadow: 0 8px 20px rgba(37,99,235,0.05);\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; font-size: 18px; margin: 0 0 15px; color: #1e3a8a;\">N\u1ed8I DUNG B\u00c0I VI\u1ebeT<\/p>\n<ul style=\"list-style-type: none; padding-left: 0; margin: 0;\">\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section1\">V\u00ec sao n\u00ean n\u1eafm c\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux?<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section2\">B\u1ea3ng t\u00f3m t\u1eaft c\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux ph\u1ed5 bi\u1ebfn<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section3\">Nh\u00f3m l\u1ec7nh \u0111i\u1ec1u h\u01b0\u1edbng: pwd, ls, cd, mkdir<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section4\">Nh\u00f3m l\u1ec7nh t\u1ea1o, copy, di chuy\u1ec3n, x\u00f3a file<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section5\">Nh\u00f3m l\u1ec7nh xem n\u1ed9i dung v\u00e0 t\u00ecm ki\u1ebfm file<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section6\">L\u1ec7nh ph\u00e2n quy\u1ec1n file Linux: chmod, chown<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section7\">Use-case: qu\u1ea3n l\u00fd file tr\u00ean VPS Linux th\u1ef1c t\u1ebf<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section8\">B\u1ea3o m\u1eadt n\u00e2ng cao sau khi c\u1ea5u h\u00ecnh xong<\/a><\/li>\n<li style=\"margin-bottom: 10px;\"><a style=\"text-decoration: none; color: #2563eb; font-weight: bold;\" href=\"#section9\">X\u1eed l\u00fd l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi d\u00f9ng l\u1ec7nh qu\u1ea3n l\u00fd file<\/a><\/li>\n<\/ul>\n<\/div>\n\n\n<style>\n.interdata-plan-carousel,.interdata-plan-carousel *{box-sizing:border-box}\n.interdata-plan-carousel{--blue:#005bea;--blue-dark:#004dcc;--text:#071832;--muted:#516173;--border:#d8e6fb;--bg:#f3f8ff;--shadow:0 5px 14px rgba(0,62,145,.08);background:var(--bg);padding:14px 56px 18px;position:relative;overflow:hidden;border-radius:20px;}\n.interdata-carousel-heading{color:#f00;font-family:Roboto,sans-serif;font-size:18px;line-height:1.35;font-weight:800;text-align:center;margin:0 0 14px}\n.interdata-plan-viewport{overflow:hidden;width:100%}\n.interdata-plan-track{display:flex;align-items:stretch;gap:12px;overflow:visible;padding:0 0 4px;transform:translate3d(0,0,0);transition:transform .45s ease;will-change:transform;touch-action:pan-y}\n.interdata-plan-card{flex:0 0 calc((100% - 24px)\/3);min-width:0;min-height:0!important;height:auto;background:#fff;border:1px solid var(--border);border-radius:8px;padding:15px 12px 13px;display:flex;flex-direction:column;box-shadow:var(--shadow)}\n.interdata-plan-title{color:var(--blue-dark);font-size:16px;line-height:1.22;font-weight:800;text-align:center;margin:0 0 7px;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n.interdata-plan-price{color:var(--blue-dark);font-size:24px;line-height:1;font-weight:900;text-align:center;margin-bottom:12px;white-space:nowrap;letter-spacing:0}\n.interdata-plan-price span{font-size:10px;font-weight:800;margin-left:2px}\n.interdata-plan-badge{align-self:center;display:inline-flex;align-items:center;justify-content:center;background:#ff3934;color:#fff;border-radius:5px;padding:7px 8px;font-size:9px;line-height:1;font-weight:800;margin-bottom:15px;white-space:nowrap;max-width:100%}\n.interdata-plan-features{list-style:none!important;padding:0!important;margin:0!important}\n.interdata-plan-features li{display:flex;gap:7px;align-items:flex-start;color:var(--text);font-size:12px;line-height:1.35;font-weight:700;text-align:left;margin:0 0 10px!important;padding:0!important}\n.interdata-plan-icon{width:14px;min-width:14px;height:14px;color:#0069ff;margin-top:2px}\n.interdata-plan-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.interdata-plan-spacer{flex:1;min-height:16px}\n.interdata-plan-button{display:flex;align-items:center;justify-content:center;min-height:42px;width:100%;margin-top:auto!important;margin-bottom:0!important;background:var(--blue);color:#fff!important;border-radius:5px;font-size:13px;font-weight:800;text-decoration:none!important;box-shadow:0 7px 14px rgba(0,91,234,.24);transition:transform .2s ease,background .2s ease}\n.interdata-plan-button:hover{background:var(--blue-dark);color:#fff!important;transform:translateY(-1px)}\n.interdata-carousel-arrow{position:absolute;top:50%;z-index:5;width:44px;height:54px;border:2px solid #fff!important;border-radius:999px;background:var(--blue)!important;color:#fff!important;box-shadow:0 8px 22px rgba(0,62,145,.32);display:flex!important;align-items:center;justify-content:center;cursor:pointer;transform:translateY(-35%);transition:background .2s ease,color .2s ease,opacity .2s ease,transform .2s ease}\n.interdata-carousel-arrow:hover{background:var(--blue-dark)!important;color:#fff!important;transform:translateY(-35%) scale(1.04)}\n.interdata-carousel-arrow:disabled{opacity:.78;cursor:not-allowed;background:#8aa6cf!important;color:#fff!important}\n.interdata-carousel-arrow:disabled:hover{background:#8aa6cf!important;color:#fff!important;transform:translateY(-35%)}\n.interdata-carousel-arrow svg{display:none!important}\n.interdata-carousel-arrow:before{content:none!important;display:none!important}\n.interdata-carousel-mark{display:block!important;color:#fff!important;font-family:Arial,Helvetica,sans-serif!important;font-size:38px!important;font-weight:900!important;line-height:1!important;text-align:center!important;pointer-events:none!important;transform:translateY(-2px)}\n.interdata-carousel-prev{left:14px}\n.interdata-carousel-prev .interdata-carousel-mark{margin-left:-2px}\n.interdata-carousel-next{right:14px}\n.interdata-carousel-next .interdata-carousel-mark{margin-right:-2px}\n@media (max-width:800px){.interdata-plan-carousel{padding:12px 44px 16px}.interdata-plan-card{flex-basis:calc((100% - 12px)\/2)}.interdata-carousel-heading{font-size:16px}.interdata-carousel-prev{left:6px}.interdata-carousel-next{right:6px}}\n@media (max-width:480px){.interdata-plan-carousel{padding:12px 38px 16px}.interdata-plan-card{flex-basis:100%}.interdata-plan-price{font-size:23px}.interdata-carousel-arrow{width:34px;height:44px}.interdata-carousel-mark{font-size:32px!important}.interdata-carousel-prev{left:3px}.interdata-carousel-next{right:3px}}\n<\/style>\n\n<div class=\"interdata-plan-carousel\" data-interdata-carousel>\n  <div class=\"interdata-carousel-heading\">Si\u00eau \u01afu \u0110\u00e3i VPS \/ CLOUD SERVER - Ti\u1ebft Ki\u1ec7m \u0110\u1ebfn 70%<\/div>\n\n  <svg width=\"0\" height=\"0\" style=\"position:absolute;visibility:hidden\" aria-hidden=\"true\">\n    <symbol id=\"id-icon-cpu\" viewBox=\"0 0 24 24\"><rect x=\"7\" y=\"7\" width=\"10\" height=\"10\" rx=\"2\"><\/rect><path d=\"M4 9h3M4 15h3M17 9h3M17 15h3M9 4v3M15 4v3M9 17v3M15 17v3\"><\/path><path d=\"M10 10h4v4h-4z\"><\/path><\/symbol>\n    <symbol id=\"id-icon-ram\" viewBox=\"0 0 24 24\"><rect x=\"4\" y=\"8\" width=\"16\" height=\"8\" rx=\"2\"><\/rect><path d=\"M7 16v2M11 16v2M15 16v2M19 16v2M7 11h1M11 11h1M15 11h1\"><\/path><\/symbol>\n    <symbol id=\"id-icon-storage\" viewBox=\"0 0 24 24\"><rect x=\"6\" y=\"3\" width=\"12\" height=\"18\" rx=\"2\"><\/rect><path d=\"M9 7h6\"><\/path><circle cx=\"12\" cy=\"16\" r=\"1.5\"><\/circle><\/symbol>\n    <symbol id=\"id-icon-network\" viewBox=\"0 0 24 24\"><path d=\"M5 12.5a10 10 0 0 1 14 0\"><\/path><path d=\"M8.5 16a5 5 0 0 1 7 0\"><\/path><path d=\"M12 19h.01\"><\/path><\/symbol>\n    <symbol id=\"id-icon-gift\" viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"8\" width=\"18\" height=\"13\" rx=\"2\"><\/rect><path d=\"M12 8v13M3 12h18\"><\/path><path d=\"M7.5 8C6.1 8 5 6.9 5 5.5S6.1 3 7.5 3C10 3 12 8 12 8\"><\/path><path d=\"M16.5 8C17.9 8 19 6.9 19 5.5S17.9 3 16.5 3C14 3 12 8 12 8\"><\/path><\/symbol>\n  <\/svg>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-prev\" type=\"button\" aria-label=\"Xem 3 g\u00f3i tr\u01b0\u1edbc\" onclick=\"var r=this.closest('[data-interdata-carousel]');if(!r)return false;var t=r.querySelector('.interdata-plan-track'),c=t?t.querySelectorAll('.interdata-plan-card'):[];if(!t||!c.length)return false;var v=window.matchMedia('(max-width:480px)').matches?1:(window.matchMedia('(max-width:800px)').matches?2:3),m=Math.max(0,c.length-Math.min(v,c.length||1)),s=[],i=0;while(i&lt;m){s.push(i);i+=v}if(!s.length||s[s.length-1]!==m)s.push(m);var p=parseInt(r.getAttribute('data-inline-page')||'0',10);p=(p-1+s.length)%s.length;r.setAttribute('data-inline-page',p);var g=parseFloat(window.getComputedStyle(t).gap)||12,w=c[0].getBoundingClientRect().width;t.style.transition='transform .45s ease';t.style.transform='translate3d('+(-(w+g)*s[p])+'px,0,0)';return false;\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8249;<\/span>\n  <\/button>\n\n  <div class=\"interdata-plan-viewport\">\n    <div class=\"interdata-plan-track\">\n      <!-- 7 card d\u1ef1 ph\u00f2ng: JavaScript s\u1ebd \u0111\u1ed3ng b\u1ed9 l\u1ea1i t\u1eeb API portal khi trang t\u1ea3i. -->\n      <article class=\"interdata-plan-card\" data-plan-pid=\"490\">\n        <h3 class=\"interdata-plan-title\">Premium Base<\/h3>\n        <div class=\"interdata-plan-price\">299.000 \u0111<span>\/3 th\u00e1ng<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore Intel Xeon Scalable<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>2 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-value-plans-2026\/best-value-plans-premium-base\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"529\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 1<\/h3>\n        <div class=\"interdata-plan-price\">998.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>2 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-1\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"530\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 2<\/h3>\n        <div class=\"interdata-plan-price\">2.666.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>5 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>70 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-2\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"531\">\n        <h3 class=\"interdata-plan-title\">INTER PLATINUM 3<\/h3>\n        <div class=\"interdata-plan-price\">5.888.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>9 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>140 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/inter-platinum-series-2026\/inter-platinum-3\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"521\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 1<\/h3>\n        <div class=\"interdata-plan-price\">988.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>3 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>3 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>30 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-1\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"522\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 2<\/h3>\n        <div class=\"interdata-plan-price\">2.988.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>4 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>8 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>80 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>300 Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-2\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n\n      <article class=\"interdata-plan-card\" data-plan-pid=\"523\">\n        <h3 class=\"interdata-plan-title\">BD-Cloud 3<\/h3>\n        <div class=\"interdata-plan-price\">5.999.000 \u0111<span>\/n\u0103m<\/span><\/div>\n        <div class=\"interdata-plan-badge\">GIA H\u1ea0N KH\u00d4NG \u0110\u1ed4I GI\u00c1<\/div>\n        <ul class=\"interdata-plan-features\">\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-cpu\"><\/use><\/svg><\/span>8 vCore<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-ram\"><\/use><\/svg><\/span>16 GB RAM<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-storage\"><\/use><\/svg><\/span>140 GB SSD NVMe<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>1 IPv4 Private<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>400 Mbps Network Port<\/li>\n          <li><span class=\"interdata-plan-icon\"><svg><use href=\"#id-icon-network\"><\/use><\/svg><\/span>Unlimited Bandwidth<\/li>\n        <\/ul>\n\n        <a class=\"interdata-plan-button\" href=\"https:\/\/support.interdata.vn\/index.php?rp=\/store\/best-plan-real-cloud\/bd-cloud-3\" target=\"_blank\" rel=\"noopener\">\u0110\u0103ng k\u00fd ngay<\/a>\n      <\/article>\n    <\/div>\n  <\/div>\n\n  <button class=\"interdata-carousel-arrow interdata-carousel-next\" type=\"button\" aria-label=\"Xem 3 g\u00f3i ti\u1ebfp theo\" onclick=\"var r=this.closest('[data-interdata-carousel]');if(!r)return false;var t=r.querySelector('.interdata-plan-track'),c=t?t.querySelectorAll('.interdata-plan-card'):[];if(!t||!c.length)return false;var v=window.matchMedia('(max-width:480px)').matches?1:(window.matchMedia('(max-width:800px)').matches?2:3),m=Math.max(0,c.length-Math.min(v,c.length||1)),s=[],i=0;while(i&lt;m){s.push(i);i+=v}if(!s.length||s[s.length-1]!==m)s.push(m);var p=parseInt(r.getAttribute('data-inline-page')||'0',10);p=(p+1)%s.length;r.setAttribute('data-inline-page',p);var g=parseFloat(window.getComputedStyle(t).gap)||12,w=c[0].getBoundingClientRect().width;t.style.transition='transform .45s ease';t.style.transform='translate3d('+(-(w+g)*s[p])+'px,0,0)';return false;\">\n    <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M9 18l6-6-6-6\"><\/path><\/svg>\n    <span class=\"interdata-carousel-mark\" aria-hidden=\"true\">&#8250;<\/span>\n  <\/button>\n<\/div>\n\n<script>\n(function(){\n  var API_GROUPS=[\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=89&module',pids:[490]},\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=100&module',pids:[529,530,531]},\n    {url:'https:\/\/support.interdata.vn\/packages.php?gid=97&module',pids:[521,522,523]}\n  ];\n  var PLAN_CYCLES={\n    490:{key:'quarterly',label:'3 th\u00e1ng'},\n    529:{key:'annually',label:'n\u0103m'},\n    530:{key:'annually',label:'n\u0103m'},\n    531:{key:'annually',label:'n\u0103m'},\n    521:{key:'annually',label:'n\u0103m'},\n    522:{key:'annually',label:'n\u0103m'},\n    523:{key:'annually',label:'n\u0103m'}\n  };\n\n  function fetchPlanData(){\n    if(window.interdataPlanApiPromise)return window.interdataPlanApiPromise;\n\n    window.interdataPlanApiPromise=Promise.all(API_GROUPS.map(function(group){\n      return fetch(group.url,{method:'GET',mode:'cors',cache:'no-store'})\n        .then(function(response){\n          if(!response.ok)throw new Error('API '+response.status);\n          return response.json();\n        })\n        .then(function(data){\n          if(!data||data.success!==true||!Array.isArray(data.products))return [];\n          return data.products.filter(function(product){\n            return group.pids.indexOf(Number(product.pid))!==-1;\n          });\n        })\n        .catch(function(error){\n          console.warn('Kh\u00f4ng th\u1ec3 c\u1eadp nh\u1eadt nh\u00f3m g\u00f3i InterData:',group.url,error);\n          return [];\n        });\n    })).then(function(groups){\n      return groups.reduce(function(all,products){return all.concat(products);},[]);\n    });\n\n    return window.interdataPlanApiPromise;\n  }\n\n  function parseDescription(html){\n    var source=String(html||'')\n      .replace(\/<brs*\/?>\/gi,'n')\n      .replace(\/<\/(p|div|li)>\/gi,'n');\n    var holder=document.createElement('div');\n    holder.innerHTML=source;\n    var strong=holder.querySelector('strong');\n    var badge=strong?strong.textContent.trim():'';\n    var lines=(holder.textContent||'').split(\/r?n\/).map(function(line){\n      return line.trim();\n    }).filter(Boolean);\n    if(badge&&lines[0]===badge)lines.shift();\n    return {badge:badge,features:lines};\n  }\n\n  function iconForFeature(feature){\n    if(\/ram\/i.test(feature))return 'id-icon-ram';\n    if(\/ssd|nvme|storage|disk\/i.test(feature))return 'id-icon-storage';\n    if(\/vcore|vcpu|cpu|xeon|amd\/i.test(feature))return 'id-icon-cpu';\n    if(\/ipv4|network|mbps|gbps|bandwidth\/i.test(feature))return 'id-icon-network';\n    return 'id-icon-gift';\n  }\n\n  function createFeatureItem(feature){\n    var item=document.createElement('li');\n    var icon=document.createElement('span');\n    var svg=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','svg');\n    var use=document.createElementNS('http:\/\/www.w3.org\/2000\/svg','use');\n    icon.className='interdata-plan-icon';\n    use.setAttribute('href','#'+iconForFeature(feature));\n    svg.appendChild(use);\n    icon.appendChild(svg);\n    item.appendChild(icon);\n    item.appendChild(document.createTextNode(feature));\n    return item;\n  }\n\n  function updateCardFromApi(root,product){\n    var pid=Number(product.pid);\n    var cycle=PLAN_CYCLES[pid];\n    var card=root.querySelector('[data-plan-pid=\"'+pid+'\"]');\n    if(!card||!cycle)return;\n\n    var title=card.querySelector('.interdata-plan-title');\n    var priceBox=card.querySelector('.interdata-plan-price');\n    var badgeBox=card.querySelector('.interdata-plan-badge');\n    var featureList=card.querySelector('.interdata-plan-features');\n    var button=card.querySelector('.interdata-plan-button');\n    var description=parseDescription(product.description);\n    var pricing=product.pricing&&product.pricing.VND;\n    var price=pricing?Number(pricing[cycle.key]):-1;\n\n    if(title&&product.name)title.textContent=product.name;\n    if(priceBox&&Number.isFinite(price)&&price>=0){\n      priceBox.textContent=Math.round(price).toLocaleString('vi-VN')+' \u0111';\n      var suffix=document.createElement('span');\n      suffix.textContent='\/'+cycle.label;\n      priceBox.appendChild(suffix);\n    }\n    if(badgeBox&&description.badge)badgeBox.textContent=description.badge;\n    if(featureList&&description.features.length){\n      featureList.textContent='';\n      description.features.forEach(function(feature){\n        featureList.appendChild(createFeatureItem(feature));\n      });\n    }\n    if(button&&product.product_url)button.href=product.product_url;\n  }\n\n  function setupInterDataCarousel(root){\n    var track=root.querySelector('.interdata-plan-track');\n    var prev=root.querySelector('.interdata-carousel-prev');\n    var next=root.querySelector('.interdata-carousel-next');\n    if(!track||!prev||!next||track.dataset.ready==='1')return;\n    track.dataset.ready='1';\n    prev.disabled=false;\n    next.disabled=false;\n    var activePage=0;\n    var touchStartX=null;\n\n    function visibleCards(){\n      if(window.matchMedia&&window.matchMedia('(max-width:480px)').matches)return 1;\n      if(window.matchMedia&&window.matchMedia('(max-width:800px)').matches)return 2;\n      return 3;\n    }\n\n    function pageStarts(){\n      var total=track.querySelectorAll('.interdata-plan-card').length;\n      var visible=Math.min(visibleCards(),total||1);\n      var maxStart=Math.max(0,total-visible);\n      var starts=[];\n      var start=0;\n      while(start<maxStart){\n        starts.push(start);\n        start+=visible;\n      }\n      if(!starts.length||starts[starts.length-1]!==maxStart)starts.push(maxStart);\n      return starts;\n    }\n\n    function renderSlide(animate){\n      var cards=track.querySelectorAll('.interdata-plan-card');\n      var starts=pageStarts();\n      if(!cards.length||!starts.length)return;\n      if(activePage>=starts.length)activePage=starts.length-1;\n      if(activePage<0)activePage=0;\n\n      var cardWidth=cards[0].getBoundingClientRect().width;\n      var trackStyle=window.getComputedStyle?window.getComputedStyle(track):null;\n      var gap=trackStyle?parseFloat(trackStyle.columnGap||trackStyle.gap):12;\n      if(!Number.isFinite(gap))gap=12;\n      if(cardWidth<=0)return;\n\n      track.style.transition=animate?'transform .45s ease':'none';\n      track.style.transform='translate3d('+(-(cardWidth+gap)*starts[activePage])+'px,0,0)';\n      prev.setAttribute('aria-disabled',starts.length>1?'false':'true');\n      next.setAttribute('aria-disabled',starts.length>1?'false':'true');\n    }\n\n    function move(direction){\n      var starts=pageStarts();\n      if(starts.length<=1)return;\n      activePage=parseInt(root.getAttribute('data-inline-page')||activePage,10)||0;\n      activePage=(activePage+direction+starts.length)%starts.length;\n      root.setAttribute('data-inline-page',activePage);\n      renderSlide(true);\n    }\n\n    track.addEventListener('touchstart',function(event){\n      touchStartX=event.touches&&event.touches[0]?event.touches[0].clientX:null;\n    },{passive:true});\n    track.addEventListener('touchend',function(event){\n      if(touchStartX===null)return;\n      var endX=event.changedTouches&&event.changedTouches[0]?event.changedTouches[0].clientX:touchStartX;\n      var distance=endX-touchStartX;\n      touchStartX=null;\n      if(Math.abs(distance)>=40)move(distance<0?1:-1);\n    },{passive:true});\n\n    function resetAfterResize(){\n      activePage=0;\n      root.setAttribute('data-inline-page','0');\n      renderSlide(false);\n    }\n\n    window.addEventListener('resize',resetAfterResize);\n    window.addEventListener('load',resetAfterResize);\n    if('ResizeObserver' in window){\n      var resizeObserver=new ResizeObserver(function(){renderSlide(false);});\n      resizeObserver.observe(root);\n    }\n    window.requestAnimationFrame(function(){renderSlide(false);});\n    window.setTimeout(function(){renderSlide(false);},250);\n    window.setTimeout(function(){renderSlide(false);},1000);\n\n    fetchPlanData().then(function(products){\n      products.forEach(function(product){updateCardFromApi(root,product);});\n      renderSlide(false);\n    });\n  }\n\n  function initInterDataCarousels(){\n    document.querySelectorAll('[data-interdata-carousel]').forEach(setupInterDataCarousel);\n  }\n\n  if(document.readyState==='loading'){\n    document.addEventListener('DOMContentLoaded',initInterDataCarousels);\n  }else{\n    initInterDataCarousels();\n  }\n\n  if('MutationObserver' in window){\n    var initQueued=false;\n    new MutationObserver(function(){\n      if(initQueued)return;\n      initQueued=true;\n      window.requestAnimationFrame(function(){\n        initQueued=false;\n        initInterDataCarousels();\n      });\n    }).observe(document.documentElement,{childList:true,subtree:true});\n  }\n})();\n<\/script>\n\n\t<div id=\"gap-532822900\" class=\"gap-element clearfix\" style=\"display:block; height:auto;\">\n\t\t\n<style>\n#gap-532822900 {\n  padding-top: 15px;\n}\n<\/style>\n\t<\/div>\n\t\n<h2 id=\"section1\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">V\u00ec sao n\u00ean n\u1eafm c\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux?<\/h2>\n<p style=\"text-align: justify;\">Linux t\u1ed5 ch\u1ee9c d\u1eef li\u1ec7u theo c\u00e2y th\u01b0 m\u1ee5c b\u1eaft \u0111\u1ea7u t\u1eeb <code>\/<\/code> (root). M\u1ecdi file, th\u01b0 m\u1ee5c, thi\u1ebft b\u1ecb \u0111\u1ec1u l\u00e0 m\u1ed9t node trong c\u00e2y n\u00e0y, kh\u00e1c ho\u00e0n to\u00e0n v\u1edbi \u1ed5 \u0111\u0129a <code>C:<\/code>, <code>D:<\/code> tr\u00ean Windows. Hi\u1ec3u c\u1ea5u tr\u00fac <a href=\"https:\/\/interdata.vn\/blog\/he-dieu-hanh-linux-la-gi\/\">h\u1ec7 \u0111i\u1ec1u h\u00e0nh Linux<\/a> gi\u00fap b\u1ea1n \u0111o\u00e1n \u0111\u00fang file n\u1eb1m \u1edf \u0111\u00e2u thay v\u00ec m\u00f2 m\u1eabm.<\/p>\n<p style=\"text-align: justify;\">Khi l\u00e0m vi\u1ec7c qua SSH, b\u1ea1n kh\u00f4ng c\u00f3 giao di\u1ec7n k\u00e9o th\u1ea3. M\u1ecdi thao t\u00e1c \u0111\u1ec1u b\u1eb1ng d\u00f2ng l\u1ec7nh. N\u1eafm ch\u1eafc c\u00e1c l\u1ec7nh c\u01a1 b\u1ea3n gi\u00fap b\u1ea1n thao t\u00e1c nhanh h\u01a1n, t\u1ef1 \u0111\u1ed9ng h\u00f3a \u0111\u01b0\u1ee3c b\u1eb1ng script, v\u00e0 x\u1eed l\u00fd s\u1ef1 c\u1ed1 m\u00e0 kh\u00f4ng ph\u1ea3i ch\u1edd h\u1ed7 tr\u1ee3. \u0110\u00e2y c\u0169ng l\u00e0 n\u1ec1n t\u1ea3ng \u0111\u1ec3 h\u1ecdc ti\u1ebfp <a href=\"https:\/\/interdata.vn\/blog\/cac-lenh-linux-thong-dung\/\">c\u00e1c l\u1ec7nh Linux c\u01a1 b\u1ea3n v\u00e0 th\u00f4ng d\u1ee5ng<\/a> kh\u00e1c nh\u01b0 qu\u1ea3n l\u00fd ti\u1ebfn tr\u00ecnh, network hay user.<\/p>\n<p style=\"text-align: justify;\">Ba kh\u00e1i ni\u1ec7m b\u1ea1n s\u1ebd g\u1eb7p li\u00ean t\u1ee5c: \u0111\u01b0\u1eddng d\u1eabn tuy\u1ec7t \u0111\u1ed1i (b\u1eaft \u0111\u1ea7u b\u1eb1ng <code>\/<\/code>), \u0111\u01b0\u1eddng d\u1eabn t\u01b0\u01a1ng \u0111\u1ed1i (t\u00ednh t\u1eeb th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i), v\u00e0 quy\u1ec1n file (ai \u0111\u01b0\u1ee3c \u0111\u1ecdc, ghi, th\u1ef1c thi). N\u1eafm ba th\u1ee9 n\u00e0y l\u00e0 \u0111\u1ee7 \u0111\u1ec3 kh\u00f4ng b\u1ecb &#8220;permission denied&#8221; gi\u1eefa ch\u1eebng.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: #fff; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Thu\u00ea VPS InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">CPU th\u1ebf h\u1ec7 m\u1edbi, SSD NVMe U.2, h\u1ed7 tr\u1ee3 k\u1ef9 thu\u1eadt 24\/7<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">\u0110ang v\u1eadn h\u00e0nh website, app ho\u1eb7c h\u1ec7 th\u1ed1ng ri\u00eang tr\u00ean Linux?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">Khi b\u1ea1n deploy website, ch\u1ea1y \u1ee9ng d\u1ee5ng Node.js\/Python, d\u1ef1ng CI\/CD ho\u1eb7c t\u1ef1 host d\u1ecbch v\u1ee5 n\u1ed9i b\u1ed9, b\u1ea1n c\u1ea7n quy\u1ec1n root \u0111\u1ec3 c\u1ea5u h\u00ecnh Nginx, PHP, database v\u00e0 c\u1ea5p quy\u1ec1n file \u0111\u00fang c\u00e1ch. VPS InterData cho b\u1ea1n to\u00e0n quy\u1ec1n \u0111\u00f3 tr\u00ean n\u1ec1n Ubuntu, Debian ho\u1eb7c CentOS, h\u1ea1 t\u1ea7ng SSD NVMe U.2 v\u00e0 CPU th\u1ebf h\u1ec7 m\u1edbi \u0111\u1ec3 thao t\u00e1c file, backup v\u00e0 build \u0111\u1ec1u nhanh.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: #fff; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/thue-vps\/\" target=\"_blank\" rel=\"noopener\">Xem B\u1ea3ng Gi\u00e1 Thu\u00ea VPS \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section2\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">B\u1ea3ng t\u00f3m t\u1eaft c\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux ph\u1ed5 bi\u1ebfn<\/h2>\n<p style=\"text-align: justify;\">B\u1ea3ng d\u01b0\u1edbi \u0111\u00e2y gom c\u00e1c l\u1ec7nh b\u1ea1n s\u1ebd d\u00f9ng h\u00e0ng ng\u00e0y. C\u1ed9t v\u00ed d\u1ee5 l\u00e0 c\u00e2u l\u1ec7nh ch\u1ea1y \u0111\u01b0\u1ee3c th\u1eadt, kh\u00f4ng ph\u1ea3i c\u00fa ph\u00e1p tr\u1eebu t\u01b0\u1ee3ng. B\u1ea1n c\u00f3 th\u1ec3 bookmark ph\u1ea7n n\u00e0y \u0111\u1ec3 tra nhanh khi thao t\u00e1c tr\u00ean terminal.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 20px 0;\">\n<thead>\n<tr style=\"background-color: #eff6ff;\">\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">L\u1ec7nh<\/th>\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">Ch\u1ee9c n\u0103ng<\/th>\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">V\u00ed d\u1ee5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>pwd<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">In \u0111\u01b0\u1eddng d\u1eabn th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>pwd<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>ls<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Li\u1ec7t k\u00ea file, th\u01b0 m\u1ee5c<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>ls -la \/var\/www<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cd<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Di chuy\u1ec3n gi\u1eefa c\u00e1c th\u01b0 m\u1ee5c<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cd \/etc\/nginx<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>mkdir<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">T\u1ea1o th\u01b0 m\u1ee5c m\u1edbi<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>mkdir -p \/opt\/app\/logs<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>touch<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">T\u1ea1o file r\u1ed7ng ho\u1eb7c c\u1eadp nh\u1eadt timestamp<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>touch index.php<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cp<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Sao ch\u00e9p file, th\u01b0 m\u1ee5c<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cp -r src\/ backup\/<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>mv<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Di chuy\u1ec3n ho\u1eb7c \u0111\u1ed5i t\u00ean<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>mv a.log b.log<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>rm<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">X\u00f3a file, th\u01b0 m\u1ee5c<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>rm -rf \/tmp\/cache<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cat<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Xem to\u00e0n b\u1ed9 n\u1ed9i dung file<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>cat \/etc\/hostname<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>less<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Xem file d\u00e0i theo trang<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>less \/var\/log\/syslog<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>find<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">T\u00ecm file theo t\u00ean ho\u1eb7c k\u00edch th\u01b0\u1edbc<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>find \/ -name \"*.log\"<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>grep<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">T\u00ecm chu\u1ed7i trong file<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>grep -r \"error\" \/var\/log\/<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>chmod<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">\u0110\u1ed5i quy\u1ec1n file<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>chmod 755 script.sh<\/code><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>chown<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">\u0110\u1ed5i ch\u1ee7 s\u1edf h\u1eefu<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>chown www-data:www-data app\/<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-43617\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/cac-lenh-quan-ly-file-Linux-2.jpg\" alt=\"c\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux 2\" width=\"800\" height=\"534\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/cac-lenh-quan-ly-file-Linux-2.jpg 1050w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/cac-lenh-quan-ly-file-Linux-2-300x200.jpg 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/cac-lenh-quan-ly-file-Linux-2-1024x684.jpg 1024w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/09\/cac-lenh-quan-ly-file-Linux-2-768x513.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<h2 id=\"section3\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Nh\u00f3m l\u1ec7nh \u0111i\u1ec1u h\u01b0\u1edbng: pwd, ls, cd, mkdir<\/h2>\n<p style=\"text-align: justify;\">B\u1ed1n l\u1ec7nh n\u00e0y l\u00e0 \u0111i\u1ec3m xu\u1ea5t ph\u00e1t c\u1ee7a m\u1ecdi thao t\u00e1c. B\u1ea1n c\u1ea7n bi\u1ebft m\u00ecnh \u0111ang \u1edf \u0111\u00e2u, c\u00f3 g\u00ec trong th\u01b0 m\u1ee5c, v\u00e0 t\u1ea1o th\u01b0 m\u1ee5c m\u1edbi tr\u01b0\u1edbc khi \u0111\u1eb7t file v\u00e0o. Th\u1ef1c h\u00e0nh theo \u0111\u00fang th\u1ee9 t\u1ef1 d\u01b0\u1edbi \u0111\u00e2y.<\/p>\n<p><strong>1\/ Ki\u1ec3m tra v\u1ecb tr\u00ed hi\u1ec7n t\u1ea1i<\/strong>. G\u00f5 <code>pwd<\/code>. K\u1ebft qu\u1ea3 th\u01b0\u1eddng l\u00e0 <code>\/root<\/code> n\u1ebfu \u0111\u0103ng nh\u1eadp b\u1eb1ng root, ho\u1eb7c <code>\/home\/username<\/code> n\u1ebfu d\u00f9ng user th\u01b0\u1eddng.<\/p>\n<p><strong>2\/ Li\u1ec7t k\u00ea file<\/strong>. L\u1ec7nh <code>ls -la<\/code> hi\u1ec3n th\u1ecb c\u1ea3 file \u1ea9n (b\u1eaft \u0111\u1ea7u b\u1eb1ng d\u1ea5u ch\u1ea5m) k\u00e8m quy\u1ec1n v\u00e0 ch\u1ee7 s\u1edf h\u1eefu.<\/p>\n<pre><code class=\"language-bash\">ls -la \/var\/www\/html<\/code><\/pre>\n<p><strong>3\/ Di chuy\u1ec3n v\u00e0o th\u01b0 m\u1ee5c<\/strong>. D\u00f9ng \u0111\u01b0\u1eddng d\u1eabn tuy\u1ec7t \u0111\u1ed1i ho\u1eb7c t\u01b0\u01a1ng \u0111\u1ed1i.<\/p>\n<pre><code class=\"language-bash\">cd \/etc\/nginx\r\ncd ..        # l\u00ean m\u1ed9t c\u1ea5p\r\ncd ~         # v\u1ec1 home\r\ncd -         # quay l\u1ea1i th\u01b0 m\u1ee5c tr\u01b0\u1edbc \u0111\u00f3<\/code><\/pre>\n<p><strong>4\/ T\u1ea1o th\u01b0 m\u1ee5c l\u1ed3ng nhau<\/strong>. Th\u00eam <code>-p<\/code> \u0111\u1ec3 t\u1ea1o c\u1ea3 c\u00e2y th\u01b0 m\u1ee5c cha n\u1ebfu ch\u01b0a c\u00f3.<\/p>\n<pre><code class=\"language-bash\">mkdir -p \/opt\/myapp\/logs\/2025<\/code><\/pre>\n<p style=\"text-align: justify;\"><em><strong>M\u1eb9o nh\u1ecf:<\/strong> nh\u1ea5n ph\u00edm <code>Tab<\/code> \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng ho\u00e0n th\u00e0nh t\u00ean file ho\u1eb7c th\u01b0 m\u1ee5c. G\u00f5 sai ch\u00ednh t\u1ea3 l\u00e0 nguy\u00ean nh\u00e2n ph\u1ed5 bi\u1ebfn nh\u1ea5t g\u00e2y l\u1ed7i &#8220;No such file or directory&#8221;.<\/em><\/p>\n<h2 id=\"section4\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Nh\u00f3m l\u1ec7nh t\u1ea1o, copy, di chuy\u1ec3n, x\u00f3a file<\/h2>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 nh\u00f3m b\u1ea1n d\u00f9ng nhi\u1ec1u nh\u1ea5t. \u0110i\u1ec3m d\u1ec5 nh\u1ea7m l\u00e0 <code>cp<\/code> v\u00e0 <code>mv<\/code> nh\u00ecn qua gi\u1ed1ng nhau nh\u01b0ng b\u1ea3n ch\u1ea5t kh\u00e1c h\u1eb3n. <code>cp<\/code> gi\u1eef nguy\u00ean file g\u1ed1c, c\u00f2n <code>mv<\/code> di chuy\u1ec3n ho\u1eb7c \u0111\u1ed5i t\u00ean, file g\u1ed1c kh\u00f4ng c\u00f2n n\u1eefa.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">touch: t\u1ea1o file r\u1ed7ng nhanh<\/h3>\n<pre><code class=\"language-bash\">touch index.html\r\ntouch file1.txt file2.txt file3.txt<\/code><\/pre>\n<p style=\"text-align: justify;\">N\u1ebfu c\u1ea7n t\u1ea1o file c\u00f3 n\u1ed9i dung, d\u00f9ng <code>echo<\/code> ho\u1eb7c tr\u00ecnh so\u1ea1n th\u1ea3o nh\u01b0 <code>nano<\/code>. B\u1ea1n c\u00f3 th\u1ec3 xem th\u00eam nhi\u1ec1u <a href=\"https:\/\/interdata.vn\/blog\/tao-file-tren-linux-bang-terminal\/\">c\u00e1ch t\u1ea1o file tr\u00ean Linux b\u1eb1ng terminal<\/a> kh\u00e1c nh\u01b0 <code>printf<\/code>, <code>cat &gt;<\/code> hay redirect.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">cp: sao ch\u00e9p file v\u00e0 th\u01b0 m\u1ee5c<\/h3>\n<pre><code class=\"language-bash\">cp config.php config.php.bak        # backup \u0111\u01a1n gi\u1ea3n\r\ncp -r \/var\/www\/html \/backup\/html    # copy c\u1ea3 th\u01b0 m\u1ee5c\r\ncp -p script.sh \/usr\/local\/bin\/     # gi\u1eef nguy\u00ean quy\u1ec1n v\u00e0 timestamp<\/code><\/pre>\n<p style=\"text-align: justify;\">Lu\u00f4n th\u00eam <code>-r<\/code> khi copy th\u01b0 m\u1ee5c, n\u1ebfu kh\u00f4ng s\u1ebd b\u00e1o l\u1ed7i &#8220;omitting directory&#8221;. C\u1edd <code>-p<\/code> h\u1eefu \u00edch khi copy file c\u1ea5u h\u00ecnh ho\u1eb7c script c\u1ea7n gi\u1eef nguy\u00ean quy\u1ec1n th\u1ef1c thi.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">mv: di chuy\u1ec3n ho\u1eb7c \u0111\u1ed5i t\u00ean<\/h3>\n<pre><code class=\"language-bash\">mv oldname.txt newname.txt          # \u0111\u1ed5i t\u00ean\r\nmv app\/ \/opt\/                       # di chuy\u1ec3n c\u1ea3 th\u01b0 m\u1ee5c\r\nmv -i file.txt \/tmp\/                # h\u1ecfi tr\u01b0\u1edbc khi ghi \u0111\u00e8<\/code><\/pre>\n<p style=\"text-align: justify;\">Tr\u00ean c\u00f9ng m\u1ed9t \u1ed5 \u0111\u0129a, <code>mv<\/code> g\u1ea7n nh\u01b0 t\u1ee9c th\u1eddi v\u00ec ch\u1ec9 \u0111\u1ed5i con tr\u1ecf. Kh\u00e1c \u1ed5 \u0111\u0129a, v\u00ed d\u1ee5 t\u1eeb <code>\/home<\/code> sang \u1ed5 mount ri\u00eang, n\u00f3 th\u1ef1c ch\u1ea5t l\u00e0 copy r\u1ed3i x\u00f3a. V\u1edbi d\u1eef li\u1ec7u l\u1edbn, thao t\u00e1c n\u00e0y s\u1ebd t\u1ed1n th\u1eddi gian.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">rm: x\u00f3a file, c\u1ea9n th\u1eadn v\u1edbi -rf<\/h3>\n<pre><code class=\"language-bash\">rm file.txt\r\nrm -i *.log                         # h\u1ecfi t\u1eebng file\r\nrm -rf \/tmp\/cache                   # x\u00f3a th\u01b0 m\u1ee5c v\u00e0 to\u00e0n b\u1ed9 n\u1ed9i dung<\/code><\/pre>\n<p style=\"text-align: justify;\">Linux kh\u00f4ng c\u00f3 th\u00f9ng r\u00e1c cho l\u1ec7nh <code>rm<\/code>. \u0110\u00e3 x\u00f3a l\u00e0 m\u1ea5t. Tuy\u1ec7t \u0111\u1ed1i kh\u00f4ng g\u00f5 <code>rm -rf \/<\/code> hay <code>rm -rf *<\/code> khi ch\u01b0a ch\u1eafc th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i. M\u1ed9t d\u1ea5u c\u00e1ch sai v\u1ecb tr\u00ed c\u00f3 th\u1ec3 x\u00f3a s\u1ea1ch server.<\/p>\n<h2 id=\"section5\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Nh\u00f3m l\u1ec7nh xem n\u1ed9i dung v\u00e0 t\u00ecm ki\u1ebfm file<\/h2>\n<p style=\"text-align: justify;\">Khi \u0111\u00e3 c\u00f3 file, b\u1ea1n c\u1ea7n \u0111\u1ecdc n\u1ed9i dung v\u00e0 t\u00ecm file gi\u1eefa h\u00e0ng ngh\u00ecn th\u01b0 m\u1ee5c. Hai nh\u00f3m l\u1ec7nh n\u00e0y gi\u00fap b\u1ea1n l\u00e0m vi\u1ec7c \u0111\u00f3 m\u00e0 kh\u00f4ng c\u1ea7n m\u1edf giao di\u1ec7n \u0111\u1ed3 h\u1ecda.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">cat, less, head, tail: xem n\u1ed9i dung<\/h3>\n<pre><code class=\"language-bash\">cat \/etc\/hostname                   # file ng\u1eafn\r\nless \/var\/log\/nginx\/access.log      # file d\u00e0i, cu\u1ed9n b\u1eb1ng ph\u00edm m\u0169i t\u00ean, tho\u00e1t b\u1eb1ng q\r\nhead -n 20 app.log                  # 20 d\u00f2ng \u0111\u1ea7u\r\ntail -f \/var\/log\/syslog             # theo d\u00f5i log realtime<\/code><\/pre>\n<p style=\"text-align: justify;\">V\u1edbi file log \u0111ang ghi li\u00ean t\u1ee5c, <code>tail -f<\/code> l\u00e0 l\u1ec7nh b\u1ea1n s\u1ebd d\u00f9ng m\u1ed7i khi debug. Nh\u1ea5n <code>Ctrl + C<\/code> \u0111\u1ec3 tho\u00e1t ch\u1ebf \u0111\u1ed9 theo d\u00f5i.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">find: t\u00ecm file theo t\u00ean, k\u00edch th\u01b0\u1edbc, th\u1eddi gian<\/h3>\n<pre><code class=\"language-bash\">find \/var\/log -name \"*.log\"                     # theo t\u00ean\r\nfind \/ -type f -size +100M                      # file l\u1edbn h\u01a1n 100MB\r\nfind \/home -mtime -7                            # s\u1eeda trong 7 ng\u00e0y g\u1ea7n \u0111\u00e2y\r\nfind \/tmp -type f -delete                       # t\u00ecm v\u00e0 x\u00f3a lu\u00f4n<\/code><\/pre>\n<p style=\"text-align: justify;\">B\u1eaft \u0111\u1ea7u t\u00ecm t\u1eeb th\u01b0 m\u1ee5c h\u1eb9p thay v\u00ec <code>\/<\/code> \u0111\u1ec3 tr\u00e1nh qu\u00e9t to\u00e0n b\u1ed9 \u1ed5 \u0111\u0129a g\u00e2y ch\u1eadm server. K\u1ebft h\u1ee3p <code>find<\/code> v\u1edbi <code>-exec<\/code> \u0111\u1ec3 ch\u1ea1y l\u1ec7nh tr\u00ean t\u1eebng k\u1ebft qu\u1ea3.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">grep: t\u00ecm chu\u1ed7i trong n\u1ed9i dung file<\/h3>\n<pre><code class=\"language-bash\">grep \"404\" \/var\/log\/nginx\/access.log\r\ngrep -r \"DB_PASSWORD\" \/var\/www\/         # t\u00ecm \u0111\u1ec7 quy trong th\u01b0 m\u1ee5c\r\ngrep -i \"error\" app.log                 # kh\u00f4ng ph\u00e2n bi\u1ec7t hoa th\u01b0\u1eddng<\/code><\/pre>\n<p style=\"text-align: justify;\">K\u1ebft h\u1ee3p <code>grep -c<\/code> \u0111\u1ec3 \u0111\u1ebfm s\u1ed1 d\u00f2ng kh\u1edbp, ho\u1eb7c pipe v\u1edbi <code>awk<\/code>, <code>cut<\/code> \u0111\u1ec3 tr\u00edch xu\u1ea5t d\u1eef li\u1ec7u c\u1ee5 th\u1ec3 t\u1eeb log.<\/p>\n<h2 id=\"section6\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">L\u1ec7nh ph\u00e2n quy\u1ec1n file Linux: chmod, chown<\/h2>\n<p style=\"text-align: justify;\">Quy\u1ec1n file trong Linux c\u00f3 ba nh\u00f3m: ch\u1ee7 s\u1edf h\u1eefu (user), nh\u00f3m (group), v\u00e0 nh\u1eefng ng\u01b0\u1eddi c\u00f2n l\u1ea1i (others). M\u1ed7i nh\u00f3m c\u00f3 ba quy\u1ec1n: \u0111\u1ecdc <code>r=4<\/code>, ghi <code>w=2<\/code>, th\u1ef1c thi <code>x=1<\/code>. C\u1ed9ng l\u1ea1i th\u00e0nh con s\u1ed1 b\u1ea1n th\u1ea5y khi g\u00f5 <code>chmod<\/code>.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; margin: 20px 0;\">\n<thead>\n<tr style=\"background-color: #eff6ff;\">\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">Quy\u1ec1n s\u1ed1<\/th>\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">\u00dd ngh\u0129a<\/th>\n<th style=\"border: 1px solid #BFDBFE; padding: 10px; text-align: left;\">D\u00f9ng khi n\u00e0o<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>644<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Ch\u1ee7 \u0111\u1ecdc v\u00e0 ghi, c\u00f2n l\u1ea1i ch\u1ec9 \u0111\u1ecdc<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">File c\u1ea5u h\u00ecnh, file HTML<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>755<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Ch\u1ee7 to\u00e0n quy\u1ec1n, c\u00f2n l\u1ea1i \u0111\u1ecdc v\u00e0 th\u1ef1c thi<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Th\u01b0 m\u1ee5c, script, binary<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>600<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Ch\u1ec9 ch\u1ee7 \u0111\u1ecdc v\u00e0 ghi<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">SSH key, file ch\u1ee9a m\u1eadt kh\u1ea9u<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\"><code>777<\/code><\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Ai c\u0169ng to\u00e0n quy\u1ec1n<\/td>\n<td style=\"border: 1px solid #E2E8F0; padding: 8px;\">Tr\u00e1nh d\u00f9ng, \u0111\u00e2y l\u00e0 l\u1ed7 h\u1ed5ng b\u1ea3o m\u1eadt<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-bash\">chmod 644 index.html                # file web th\u00f4ng th\u01b0\u1eddng\r\nchmod 755 deploy.sh                 # script c\u1ea7n th\u1ef1c thi\r\nchmod +x backup.sh                  # th\u00eam quy\u1ec1n th\u1ef1c thi, gi\u1eef nguy\u00ean quy\u1ec1n c\u0169\r\n\r\nchown www-data:www-data \/var\/www\/html       # \u0111\u1ed5i c\u1ea3 user v\u00e0 group\r\nchown -R nginx:nginx \/etc\/nginx             # \u00e1p d\u1ee5ng cho to\u00e0n b\u1ed9 th\u01b0 m\u1ee5c\r\nchown user:group file.txt<\/code><\/pre>\n<p style=\"text-align: justify;\"><strong>Quy t\u1eafc:<\/strong> web server nh\u01b0 Nginx ho\u1eb7c Apache c\u1ea7n \u0111\u1ecdc file web, n\u00ean ch\u1ee7 s\u1edf h\u1eefu th\u01b0\u1eddng l\u00e0 <code>www-data<\/code> ho\u1eb7c <code>nginx<\/code> v\u1edbi quy\u1ec1n 644 cho file, 755 cho th\u01b0 m\u1ee5c. \u0110\u1eebng d\u00f9ng 777 cho m\u1ecdi th\u1ee9. R\u1ea5t nhi\u1ec1u server b\u1ecb chi\u1ebfm quy\u1ec1n \u0111i\u1ec1u khi\u1ec3n ch\u1ec9 v\u00ec th\u00f3i quen n\u00e0y.<\/p>\n<h2 id=\"section7\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">Use-case: qu\u1ea3n l\u00fd file tr\u00ean VPS Linux th\u1ef1c t\u1ebf<\/h2>\n<p style=\"text-align: justify;\">Ba t\u00ecnh hu\u1ed1ng d\u01b0\u1edbi \u0111\u00e2y g\u1eb7p g\u1ea7n nh\u01b0 ngay sau khi b\u1ea1n thu\u00ea VPS v\u00e0 b\u1eaft \u0111\u1ea7u deploy \u1ee9ng d\u1ee5ng. N\u1ebfu b\u1ea1n t\u1ef1 qu\u1ea3n tr\u1ecb server, \u0111\u00e2y l\u00e0 ki\u1ec3u c\u00f4ng vi\u1ec7c thu\u1ed9c d\u1ea1ng <a href=\"https:\/\/interdata.vn\/blog\/vps-unmanaged-la-gi\/\">VPS Unmanaged cho ng\u01b0\u1eddi c\u00f3 ki\u1ebfn th\u1ee9c k\u1ef9 thu\u1eadt<\/a>.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">1. C\u1ea5p quy\u1ec1n cho web server \u0111\u1ecdc file<\/h3>\n<pre><code class=\"language-bash\">chown -R www-data:www-data \/var\/www\/html\r\nfind \/var\/www\/html -type d -exec chmod 755 {} \\;\r\nfind \/var\/www\/html -type f -exec chmod 644 {} \\;<\/code><\/pre>\n<p style=\"text-align: justify;\">Ba l\u1ec7nh tr\u00ean l\u00e0 c\u00f4ng th\u1ee9c chu\u1ea9n cho th\u01b0 m\u1ee5c web. Th\u01b0 m\u1ee5c c\u1ea7n quy\u1ec1n th\u1ef1c thi \u0111\u1ec3 v\u00e0o \u0111\u01b0\u1ee3c, c\u00f2n file ch\u1ec9 c\u1ea7n \u0111\u1ecdc. N\u1ebfu web b\u00e1o 403 Forbidden, ki\u1ec3m tra l\u1ea1i quy\u1ec1n th\u01b0 m\u1ee5c cha v\u00e0 c\u1ea5u h\u00ecnh <code>nginx<\/code> ho\u1eb7c <code>apache<\/code>.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">2. N\u00e9n v\u00e0 gi\u1ea3i n\u00e9n file<\/h3>\n<pre><code class=\"language-bash\">tar -czvf backup.tar.gz \/var\/www\/html       # n\u00e9n\r\ntar -xzvf backup.tar.gz -C \/tmp\/restore     # gi\u1ea3i n\u00e9n v\u00e0o th\u01b0 m\u1ee5c c\u1ee5 th\u1ec3\r\nunzip archive.zip -d \/var\/www\/html          # x\u1eed l\u00fd file .zip<\/code><\/pre>\n<p style=\"text-align: justify;\">Nh\u1edb th\u00eam <code>-C<\/code> khi gi\u1ea3i n\u00e9n \u0111\u1ec3 ch\u1ec9 \u0111\u1ecbnh \u0111\u00edch, tr\u00e1nh ghi \u0111\u00e8 lung tung v\u00e0o th\u01b0 m\u1ee5c hi\u1ec7n t\u1ea1i. V\u1edbi file l\u1edbn, c\u00f3 th\u1ec3 d\u00f9ng <code>rsync<\/code> thay v\u00ec <code>tar<\/code> n\u1ebfu ch\u1ec9 mu\u1ed1n \u0111\u1ed3ng b\u1ed9 ph\u1ea7n thay \u0111\u1ed5i. N\u1ebfu b\u1ea1n \u0111ang v\u1eadn h\u00e0nh m\u1ed9t h\u1ec7 th\u1ed1ng <a href=\"https:\/\/interdata.vn\/blog\/file-server-la-gi\/\">File Server v\u00e0 qu\u1ea3n l\u00fd t\u1ec7p tin qua m\u1ea1ng<\/a>, c\u00e1c l\u1ec7nh n\u00e0y s\u1ebd l\u00e0 c\u00f4ng c\u1ee5 h\u00e0ng ng\u00e0y.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">3. D\u1ecdn d\u1eb9p log c\u0169<\/h3>\n<pre><code class=\"language-bash\">find \/var\/log -name \"*.log\" -mtime +30 -delete\r\njournalctl --vacuum-time=30d                    # d\u1ecdn log systemd<\/code><\/pre>\n<p style=\"text-align: justify;\">Ch\u1ea1y \u0111\u1ecbnh k\u1ef3 h\u00e0ng tu\u1ea7n b\u1eb1ng cron \u0111\u1ec3 tr\u00e1nh \u1ed5 \u0111\u0129a b\u1ecb \u0111\u1ea7y. \u0110\u1eebng x\u00f3a <code>\/var\/log\/syslog<\/code> ho\u1eb7c <code>\/var\/log\/auth.log<\/code> khi c\u00f2n \u0111ang c\u1ea7n \u0111i\u1ec1u tra s\u1ef1 c\u1ed1.<\/p>\n<div style=\"background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); border: 1.5px solid #2563EB; border-radius: 12px; padding: 28px; margin: 35px 0; text-align: center;\">\n<p style=\"font-family: 'Be Vietnam Pro', sans-serif; font-size: 22px; font-weight: bold; color: #1e3a8a; margin: 0 0 8px;\">\u0110\u00e3 r\u00f5 workload, ch\u1ecdn g\u00f3i VPS theo \u0111\u00fang nhu c\u1ea7u v\u1eadn h\u00e0nh<\/p>\n<p style=\"font-size: 15px; color: #4b5563; margin-bottom: 20px;\">M\u1ed7i h\u1ec7 th\u1ed1ng c\u00f3 nhu c\u1ea7u kh\u00e1c nhau: web WordPress nh\u1ecf c\u1ea7n c\u1ea5u h\u00ecnh g\u1ecdn, app Node.js c\u1ea7n RAM v\u00e0 CPU \u1ed5n \u0111\u1ecbnh, h\u1ec7 th\u1ed1ng backup ho\u1eb7c l\u01b0u tr\u1eef c\u1ea7n dung l\u01b0\u1ee3ng l\u1edbn. Canh Me t\u1ed5ng h\u1ee3p khuy\u1ebfn m\u00e3i v\u00e0 Hot Deals VPS, Cloud Server m\u1edbi nh\u1ea5t c\u1ee7a InterData \u0111\u1ec3 b\u1ea1n ch\u1ecdn \u0111\u00fang g\u00f3i theo t\u1ea3i th\u1ef1c t\u1ebf, ti\u1ebft ki\u1ec7m chi ph\u00ed thu\u00ea.<\/p>\n<p><a style=\"background: #2563EB; color: #fff; padding: 12px 30px; text-decoration: none; font-weight: 600; border-radius: 8px; display: inline-block;\" href=\"https:\/\/interdata.vn\/canhme\/\" target=\"_blank\" rel=\"noopener\">S\u0103n \u01afu \u0110\u00e3i VPS Si\u00eau Ti\u1ebft Ki\u1ec7m \u27f6<\/a><\/p>\n<\/div>\n<h2 id=\"section8\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">B\u1ea3o m\u1eadt n\u00e2ng cao sau khi c\u1ea5u h\u00ecnh xong<\/h2>\n<p style=\"text-align: justify;\">N\u1eafm l\u1ec7nh qu\u1ea3n l\u00fd file ch\u1ec9 l\u00e0 b\u01b0\u1edbc \u0111\u1ea7u. Sau khi \u0111\u00e3 c\u1ea5u h\u00ecnh \u1ed5n \u0111\u1ecbnh, b\u1ea1n c\u1ea7n si\u1ebft l\u1ea1i b\u1ea3o m\u1eadt \u0111\u1ec3 gi\u1ea3m thi\u1ec3u r\u1ee7i ro, \u0111\u1eb7c bi\u1ec7t v\u1edbi VPS c\u00f3 IP c\u00f4ng khai.<\/p>\n<p><strong>1\/ T\u1eaft \u0111\u0103ng nh\u1eadp root b\u1eb1ng m\u1eadt kh\u1ea9u, chuy\u1ec3n sang SSH Key.<\/strong> H\u01b0\u1edbng d\u1eabn chi ti\u1ebft trong b\u00e0i <a href=\"https:\/\/interdata.vn\/blog\/ssh-key-la-gi\/\">thi\u1ebft l\u1eadp SSH Key b\u1ea3o m\u1eadt<\/a>. L\u00e0m m\u1ed9t l\u1ea7n, d\u00f9ng m\u00e3i.<\/p>\n<p><strong>2\/ B\u1eadt firewall UFW (Ubuntu, Debian)<\/strong> ho\u1eb7c <code>firewalld<\/code> (CentOS):<\/p>\n<pre><code class=\"language-bash\">ufw allow 22\/tcp\r\nufw allow 80,443\/tcp\r\nufw enable<\/code><\/pre>\n<p><strong>3\/ C\u00e0i Fail2Ban<\/strong> \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng ch\u1eb7n IP brute-force SSH:<\/p>\n<pre><code class=\"language-bash\">apt install fail2ban -y\r\nsystemctl enable --now fail2ban<\/code><\/pre>\n<p><strong>4\/ Ki\u1ec3m tra quy\u1ec1n file \u0111\u1ecbnh k\u1ef3.<\/strong> T\u00ecm file c\u00f3 quy\u1ec1n 777 ho\u1eb7c thu\u1ed9c s\u1edf h\u1eefu user l\u1ea1:<\/p>\n<pre><code class=\"language-bash\">find \/var\/www -type f -perm 0777\r\nfind \/var\/www ! -user www-data ! -user root<\/code><\/pre>\n<p style=\"text-align: justify;\">Sau khi \u0111\u00e3 t\u1ed1i \u01b0u c\u1ea5u h\u00ecnh, b\u1ea1n c\u00f3 th\u1ec3 xem th\u00eam h\u01b0\u1edbng d\u1eabn <a href=\"https:\/\/interdata.vn\/blog\/huong-dan-toi-uu-hoa-vps-linux\/\">t\u1ed1i \u01b0u h\u00f3a VPS Linux<\/a> \u0111\u1ec3 tinh ch\u1ec9nh kernel, swap v\u00e0 caching cho ph\u00f9 h\u1ee3p v\u1edbi workload.<\/p>\n<div style=\"display: flex; flex-wrap: wrap; background-color: #fff; border: 1.5px solid #BFDBFE; box-shadow: 0 8px 20px rgba(37,99,235,0.08); border-radius: 12px; overflow: hidden; margin: 35px 0;\">\n<div style=\"flex: 1; min-width: 250px; background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%); display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center;\">\n<div>\n<p style=\"color: #fff; font-size: 34px; font-family: 'Be Vietnam Pro', sans-serif; font-weight: bold; margin: 0; line-height: 1.1;\">Cloud Server InterData<\/p>\n<p style=\"color: #dbeafe; font-size: 15px; font-weight: 600; margin-top: 12px;\">N\u00e2ng ho\u1eb7c h\u1ea1 t\u00e0i nguy\u00ean nhanh theo t\u1ea3i, m\u1ea1ng t\u1ed1c \u0111\u1ed9 cao<\/p>\n<\/div>\n<\/div>\n<div style=\"flex: 2; padding: 25px; min-width: 300px;\">\n<h3 style=\"font-family: 'Be Vietnam Pro', sans-serif; color: #1e3a8a; margin-top: 0; font-size: 20px;\">H\u1ec7 th\u1ed1ng \u0111ang ch\u1ea1y production v\u00e0 t\u1ea3i thay \u0111\u1ed5i th\u1ea5t th\u01b0\u1eddng?<\/h3>\n<p style=\"text-align: justify; font-size: 15px; margin-bottom: 15px;\">VPS c\u1ea5u h\u00ecnh c\u1ed1 \u0111\u1ecbnh ph\u00f9 h\u1ee3p v\u1edbi web nh\u1ecf ho\u1eb7c d\u1ef1 \u00e1n c\u00e1 nh\u00e2n. Khi h\u1ec7 th\u1ed1ng \u0111\u00e3 l\u00ean production, ph\u1ee5c v\u1ee5 nhi\u1ec1u ng\u01b0\u1eddi d\u00f9ng, c\u00f3 \u0111\u1ee3t traffic t\u0103ng cao theo chi\u1ebfn d\u1ecbch ho\u1eb7c theo m\u00f9a, b\u1ea1n c\u1ea7n n\u00e2ng RAM, CPU, dung l\u01b0\u1ee3ng l\u01b0u tr\u1eef m\u00e0 kh\u00f4ng mu\u1ed1n migrate d\u1eef li\u1ec7u sang m\u00e1y m\u1edbi. Cloud Server InterData cho ph\u00e9p m\u1edf r\u1ed9ng t\u00e0i nguy\u00ean theo t\u1ea3i th\u1ef1c t\u1ebf, v\u1eabn gi\u1eef nguy\u00ean IP, c\u1ea5u h\u00ecnh v\u00e0 d\u1eef li\u1ec7u \u0111\u00e3 thi\u1ebft l\u1eadp. H\u1ea1 t\u1ea7ng SSD NVMe U.2, c\u00f3 backup \u0111\u1ecbnh k\u1ef3 v\u00e0 ch\u1ed1ng DDoS.<\/p>\n<p><a style=\"background: linear-gradient(90deg, #2563EB 0%, #1E3A8A 100%); color: #fff; padding: 12px 25px; text-decoration: none; font-weight: 600; border-radius: 8px; font-size: 15px; display: inline-block; box-shadow: 0 5px 15px rgba(37,99,235,0.3);\" href=\"https:\/\/interdata.vn\/cloud-server\/\" target=\"_blank\" rel=\"noopener\">Xem B\u1ea3ng Gi\u00e1 Cloud Server \u27f6<\/a><\/p>\n<\/div>\n<\/div>\n<h2 id=\"section9\" style=\"color: #1e3a8a; font-size: 24px; font-weight: bold; text-align: left; border-left: 5px solid #2563EB; padding-left: 15px; margin: 40px 0 20px; line-height: 1.4;\">X\u1eed l\u00fd l\u1ed7i th\u01b0\u1eddng g\u1eb7p khi d\u00f9ng l\u1ec7nh qu\u1ea3n l\u00fd file<\/h2>\n<p style=\"text-align: justify;\">Ba l\u1ed7i d\u01b0\u1edbi \u0111\u00e2y chi\u1ebfm ph\u1ea7n l\u1edbn c\u00e1c l\u1ea7n b\u1ea1n ph\u1ea3i d\u1eebng l\u1ea1i gi\u1eefa ch\u1eebng khi thao t\u00e1c v\u1edbi file tr\u00ean Linux. M\u1ed7i l\u1ed7i \u0111\u1ec1u c\u00f3 c\u00e1ch s\u1eeda nhanh.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">1. Permission denied<\/h3>\n<p style=\"text-align: justify;\"><strong>Tri\u1ec7u ch\u1ee9ng:<\/strong> ch\u1ea1y <code>cp<\/code>, <code>mv<\/code>, <code>rm<\/code> ho\u1eb7c ch\u1ec9nh file b\u00e1o &#8220;Permission denied&#8221;.<\/p>\n<p style=\"text-align: justify;\"><strong>Nguy\u00ean nh\u00e2n:<\/strong> user hi\u1ec7n t\u1ea1i kh\u00f4ng c\u00f3 quy\u1ec1n ghi l\u00ean file ho\u1eb7c th\u01b0 m\u1ee5c \u0111\u00f3.<\/p>\n<p style=\"text-align: justify;\"><strong>C\u00e1ch s\u1eeda:<\/strong> ki\u1ec3m tra quy\u1ec1n v\u00e0 ch\u1ee7 s\u1edf h\u1eefu tr\u01b0\u1edbc.<\/p>\n<pre><code class=\"language-bash\">ls -la \/duong\/dan\/file\r\nid                          # xem user hi\u1ec7n t\u1ea1i\r\nsudo chown $USER file       # \u0111\u1ed5i ch\u1ee7 s\u1edf h\u1eefu\r\nsudo chmod u+w file         # c\u1ea5p quy\u1ec1n ghi cho ch\u1ee7<\/code><\/pre>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">2. No such file or directory \/ File not found<\/h3>\n<p style=\"text-align: justify;\"><strong>Tri\u1ec7u ch\u1ee9ng:<\/strong> l\u1ec7nh b\u00e1o file kh\u00f4ng t\u1ed3n t\u1ea1i d\u00f9 b\u1ea1n ch\u1eafc l\u00e0 c\u00f3.<\/p>\n<p style=\"text-align: justify;\"><strong>Nguy\u00ean nh\u00e2n:<\/strong> sai \u0111\u01b0\u1eddng d\u1eabn, sai ch\u1eef hoa ch\u1eef th\u01b0\u1eddng (Linux ph\u00e2n bi\u1ec7t hoa th\u01b0\u1eddng), ho\u1eb7c \u0111ang \u1edf sai th\u01b0 m\u1ee5c.<\/p>\n<p style=\"text-align: justify;\"><strong>C\u00e1ch s\u1eeda:<\/strong> ki\u1ec3m tra v\u1ecb tr\u00ed v\u00e0 t\u00ecm file th\u1eadt.<\/p>\n<pre><code class=\"language-bash\">pwd\r\nls -la\r\nfind \/ -name \"t\u00ean-file\" 2&gt;\/dev\/null<\/code><\/pre>\n<h3 style=\"color: #1e3a8a; font-size: 19px; margin: 25px 0 10px;\">3. L\u1ed7i c\u00fa ph\u00e1p l\u1ec7nh: command not found, missing operand<\/h3>\n<p style=\"text-align: justify;\"><strong>Tri\u1ec7u ch\u1ee9ng:<\/strong> &#8220;command not found&#8221; ho\u1eb7c &#8220;missing operand after&#8230;&#8221;.<\/p>\n<p style=\"text-align: justify;\"><strong>Nguy\u00ean nh\u00e2n:<\/strong> g\u00f5 sai t\u00ean l\u1ec7nh, thi\u1ebfu tham s\u1ed1, ho\u1eb7c g\u00f3i ch\u01b0a \u0111\u01b0\u1ee3c c\u00e0i.<\/p>\n<p style=\"text-align: justify;\"><strong>C\u00e1ch s\u1eeda:<\/strong> ki\u1ec3m tra l\u1ea1i l\u1ec7nh, xem package c\u00f3 t\u1ed3n t\u1ea1i kh\u00f4ng.<\/p>\n<pre><code class=\"language-bash\">which cp                    # ki\u1ec3m tra l\u1ec7nh c\u00f3 t\u1ed3n t\u1ea1i\r\nman cp                      # \u0111\u1ecdc h\u01b0\u1edbng d\u1eabn\r\napt install coreutils -y    # Debian\/Ubuntu\r\nyum install coreutils -y    # CentOS\/RHEL<\/code><\/pre>\n<div style=\"background-color: #f8fafc; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 30px; margin: 40px 0;\">\n<h2 style=\"color: #1e3a8a; font-size: 22px; font-weight: bold; margin-top: 0;\">C\u00e2u H\u1ecfi Th\u01b0\u1eddng G\u1eb7p v\u1ec1 C\u00e1c L\u1ec7nh Qu\u1ea3n L\u00fd File Linux<\/h2>\n<h3 style=\"color: #1e3a8a; font-size: 17px; margin: 20px 0 6px;\">C\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file trong Linux l\u00e0 g\u00ec?<\/h3>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 nh\u00f3m l\u1ec7nh thao t\u00e1c v\u1edbi file v\u00e0 th\u01b0 m\u1ee5c qua terminal, g\u1ed3m \u0111i\u1ec1u h\u01b0\u1edbng (<code>pwd<\/code>, <code>ls<\/code>, <code>cd<\/code>), t\u1ea1o (<code>touch<\/code>, <code>mkdir<\/code>), sao ch\u00e9p v\u00e0 di chuy\u1ec3n (<code>cp<\/code>, <code>mv<\/code>), x\u00f3a (<code>rm<\/code>), xem n\u1ed9i dung (<code>cat<\/code>, <code>less<\/code>), t\u00ecm ki\u1ebfm (<code>find<\/code>, <code>grep<\/code>) v\u00e0 ph\u00e2n quy\u1ec1n (<code>chmod<\/code>, <code>chown<\/code>).<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 17px; margin: 20px 0 6px;\">L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 t\u1ea1o file trong Linux b\u1eb1ng terminal?<\/h3>\n<p style=\"text-align: justify;\">Nhanh nh\u1ea5t l\u00e0 d\u00f9ng <code>touch tenfile.txt<\/code> \u0111\u1ec3 t\u1ea1o file r\u1ed7ng. N\u1ebfu c\u1ea7n n\u1ed9i dung, d\u00f9ng <code>echo \"n\u1ed9i dung\" &gt; tenfile.txt<\/code> ho\u1eb7c m\u1edf tr\u00ecnh so\u1ea1n th\u1ea3o nh\u01b0 <code>nano tenfile.txt<\/code>. C\u00f3 th\u1ec3 t\u1ea1o nhi\u1ec1u file c\u00f9ng l\u00fac b\u1eb1ng <code>touch f1.txt f2.txt f3.txt<\/code>.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 17px; margin: 20px 0 6px;\">S\u1ef1 kh\u00e1c nhau gi\u1eefa cp v\u00e0 mv trong Linux?<\/h3>\n<p style=\"text-align: justify;\"><code>cp<\/code> sao ch\u00e9p v\u00e0 gi\u1eef nguy\u00ean file g\u1ed1c, c\u00f2n <code>mv<\/code> di chuy\u1ec3n ho\u1eb7c \u0111\u1ed5i t\u00ean n\u00ean file g\u1ed1c kh\u00f4ng c\u00f2n. V\u1edbi th\u01b0 m\u1ee5c, <code>cp<\/code> c\u1ea7n c\u1edd <code>-r<\/code>. Tr\u00ean c\u00f9ng \u1ed5 \u0111\u0129a, <code>mv<\/code> g\u1ea7n nh\u01b0 t\u1ee9c th\u1eddi v\u00ec ch\u1ec9 \u0111\u1ed5i con tr\u1ecf, c\u00f2n <code>cp<\/code> lu\u00f4n ph\u1ea3i copy d\u1eef li\u1ec7u th\u1eadt.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 17px; margin: 20px 0 6px;\">chmod 755 l\u00e0 g\u00ec?<\/h3>\n<p style=\"text-align: justify;\">\u0110\u00e2y l\u00e0 c\u00e1ch c\u1ea5p quy\u1ec1n <code>rwxr-xr-x<\/code>: ch\u1ee7 s\u1edf h\u1eefu \u0111\u1ecdc, ghi, th\u1ef1c thi; nh\u00f3m v\u00e0 ng\u01b0\u1eddi kh\u00e1c ch\u1ec9 \u0111\u1ecdc v\u00e0 th\u1ef1c thi. Th\u01b0\u1eddng \u00e1p cho th\u01b0 m\u1ee5c, script ho\u1eb7c binary. Kh\u00f4ng n\u00ean d\u00f9ng cho file ch\u1ee9a m\u1eadt kh\u1ea9u hay SSH key, nh\u1eefng file n\u00e0y c\u1ea7n <code>600<\/code>.<\/p>\n<h3 style=\"color: #1e3a8a; font-size: 17px; margin: 20px 0 6px;\">L\u00e0m sao t\u00ecm file trong Linux b\u1eb1ng d\u00f2ng l\u1ec7nh?<\/h3>\n<p style=\"text-align: justify;\">D\u00f9ng <code>find \/duong\/dan -name \"*.log\"<\/code> \u0111\u1ec3 t\u00ecm theo t\u00ean, th\u00eam <code>-size +100M<\/code> \u0111\u1ec3 l\u1ecdc file l\u1edbn, ho\u1eb7c <code>-mtime -7<\/code> cho file s\u1eeda g\u1ea7n \u0111\u00e2y. Mu\u1ed1n t\u00ecm chu\u1ed7i b\u00ean trong n\u1ed9i dung, d\u00f9ng <code>grep -r \"keyword\" \/thu-muc\/<\/code>.<\/p>\n<\/div>\n<div style=\"border-top: 2px dashed #BFDBFE; margin-top: 50px; padding-top: 30px;\">\n<h2 style=\"color: #1e3a8a; font-size: 22px; font-weight: bold;\">L\u1eddi k\u1ebft<\/h2>\n<p style=\"text-align: justify;\">C\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux trong b\u00e0i n\u00e0y ph\u1ee7 \u0111\u1ee7 t\u1eeb \u0111i\u1ec1u h\u01b0\u1edbng, t\u1ea1o v\u00e0 x\u00f3a, sao ch\u00e9p v\u00e0 di chuy\u1ec3n, xem n\u1ed9i dung, t\u00ecm ki\u1ebfm \u0111\u1ebfn ph\u00e2n quy\u1ec1n. \u0110\u1ee7 \u0111\u1ec3 b\u1ea1n t\u1ef1 tin thao t\u00e1c tr\u00ean b\u1ea5t k\u1ef3 VPS Ubuntu, Debian hay CentOS n\u00e0o. B\u01b0\u1edbc ti\u1ebfp theo: ch\u1ecdn m\u1ed9t VPS c\u00f3 quy\u1ec1n root ph\u00f9 h\u1ee3p v\u1edbi workload th\u1ef1c t\u1ebf (web nh\u1ecf, app n\u1ed9i b\u1ed9, hay h\u1ec7 th\u1ed1ng c\u00f3 t\u1ea3i bi\u1ebfn \u0111\u1ed9ng), th\u1ef1c h\u00e0nh t\u1eebng l\u1ec7nh tr\u00ean m\u00f4i tr\u01b0\u1eddng th\u1eadt, sau \u0111\u00f3 si\u1ebft b\u1ea3o m\u1eadt b\u1eb1ng SSH Key v\u00e0 firewall. C\u00e0ng luy\u1ec7n tr\u00ean server th\u1eadt, b\u1ea1n c\u00e0ng x\u1eed l\u00fd s\u1ef1 c\u1ed1 nhanh khi g\u1eb7p l\u1ed7i.<\/p>\n<p style=\"text-align: justify;\">N\u1ebfu ch\u01b0a c\u00f3 server \u0111\u1ec3 th\u1ef1c h\u00e0nh, xem <a href=\"https:\/\/interdata.vn\/thue-vps\/#pricing\" target=\"_blank\" rel=\"noopener\">b\u1ea3ng gi\u00e1 thu\u00ea VPS InterData<\/a> ho\u1eb7c ch\u1ecdn Cloud Server n\u1ebfu h\u1ec7 th\u1ed1ng \u0111\u00e3 \u1edf giai \u0111o\u1ea1n production v\u1edbi nhu c\u1ea7u m\u1edf r\u1ed9ng t\u00e0i nguy\u00ean.<\/p>\n<\/div>\n<p style=\"text-align: justify; font-size: 13px; font-style: italic; color: #6b7280; margin-top: 30px; border-top: 1px solid #E5E7EB; padding-top: 15px;\"><em>N\u1ed9i dung mang t\u00ednh tham kh\u1ea3o. L\u1ec7nh, c\u00fa ph\u00e1p, \u0111\u01b0\u1eddng d\u1eabn file v\u00e0 t\u00f9y ch\u1ecdn c\u1ea5u h\u00ecnh c\u00f3 th\u1ec3 thay \u0111\u1ed5i theo phi\u00ean b\u1ea3n h\u1ec7 \u0111i\u1ec1u h\u00e0nh, phi\u00ean b\u1ea3n ph\u1ea7n m\u1ec1m v\u00e0 m\u00f4i tr\u01b0\u1eddng c\u1ee5 th\u1ec3. N\u00ean ki\u1ec3m th\u1eed, sao l\u01b0u d\u1eef li\u1ec7u v\u00e0 \u0111\u00e1nh gi\u00e1 r\u1ee7i ro tr\u01b0\u1edbc khi \u00e1p d\u1ee5ng l\u00ean server production.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C\u00e1c l\u1ec7nh qu\u1ea3n l\u00fd file Linux l\u00e0 th\u1ee9 b\u1ea1n ph\u1ea3i n\u1eafm tr\u01b0\u1edbc ti\u00ean khi v\u1eeba SSH v\u00e0o m\u1ed9t VPS m\u1edbi. Kh\u00f4ng bi\u1ebft g\u00f5 g\u00ec \u0111\u1ec3 t\u1ea1o file, copy, ph\u00e2n quy\u1ec1n hay t\u00ecm file th\u00ec m\u1ecdi thao t\u00e1c sau \u0111\u00f3 \u0111\u1ec1u b\u1ebf t\u1eafc. B\u00e0i n\u00e0y h\u01b0\u1edbng d\u1eabn th\u1ef1c h\u00e0nh t\u1eeb A \u0111\u1ebfn Z, c\u00f3 l\u1ec7nh ch\u1ea1y<\/p>\n","protected":false},"author":2,"featured_media":43616,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[165],"tags":[],"class_list":["post-43609","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kien-thuc-it"],"_links":{"self":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/comments?post=43609"}],"version-history":[{"count":8,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43609\/revisions"}],"predecessor-version":[{"id":43619,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/43609\/revisions\/43619"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media\/43616"}],"wp:attachment":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media?parent=43609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/categories?post=43609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/tags?post=43609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}