[转]文件缓存的方式减少网站负载

news/2024/5/19 7:21:51/文章来源:https://blog.csdn.net/weixin_30670965/article/details/97777106
Asp.net 缓存Cache功能已经是很常见的功能了,网络上面这种相关的文章也非常之多,我这里所要讲的缓存并不是.NET所提供的缓存,而是过通文件方式来存放的。这样可以很好的减少服务器资源。
先看一下我做这个的缓存流程图:




如上图所示,其实程序就是在Page_Load的时候做一下判断,是否有缓存文件存在或者缓存是否过期(过期的判断是通过文件的最后修改日期来处理的),如果没有,它将会去读取当前页的页面HTML代码,并用当前页的文件名保存成一个文件缓存。下次再打开此页的时候就会去读取存下来的缓存文件的内容,并同时中断PageLoad后边的方式,从页实现很有效的使用很方便的缓存机制。

以下是部分代码
default.aspx.cs (一个普通的服务端页面)
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace cacheweb
{
    
/// <summary>
    
/// _default 的摘要说明。
    
/// </summary>
    public class _default : BasePage
    {
        
private void Page_Load(object sender, System.EventArgs e)
        {
            
// 在此处放置用户代码以初始化页面
            if(this.FileCacheProgress())
            {
                
return ;
            }

            initPage();
        }

        
private void initPage()
        {            
            Response.Write(
"FileCache V0.1 - 文件缓存方式的功能演示<br />");
            Response.Write(
"Wathon Team<br />");
            Response.Write(
"<a href=\"http://www.wathon.com\">http://www.wathon.com</a><br />");
            Response.Write("<a href=\"http://www.cnblogs.com/huacn/archive/2007/11/07/aspnet_page_cache_file.html\">参数讨论</a><br />");
            Response.Write("以下是上次缓存的时间:<br />");
            Response.Write(DateTime.Now.ToLocalTime()
+"<br />");
            Response.Write(DateTime.Now.ToLongDateString()
+"<br />");
            Response.Write(DateTime.Now.ToLongTimeString()
+"<br />");
            Response.Write(DateTime.Now.ToOADate()
+"<br />");
            Response.Write(DateTime.Now.ToShortDateString()
+"<br />");
            Response.Write(DateTime.Now.ToUniversalTime()
+"<br />");
            Response.Write(DateTime.Now.ToShortTimeString()
+"<br />");
        }

        
#region Web 窗体设计器生成的代码
        
override protected void OnInit(EventArgs e)
        {
            
//
            
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
            
//
            InitializeComponent();
            
base.OnInit(e);
        }
        
        
/// <summary>
        
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
        
/// 此方法的内容。
        
/// </summary>
        private void InitializeComponent()
        {    
            
this.Load += new System.EventHandler(this.Page_Load);
        }
        
#endregion
    }
}


BasePage.cs (页面的基类)
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using System.Text;
using System.IO;
using cacheweb.App_code.FileCache;


/// <summary>
/// 页面的基类
/// Wathon Team.
/// By Json Lee 2007-11-07
/// http://www.wathon.com
/// </summary>
public class BasePage:Page
{
    
#region 缓存
    
/// <summary>
    
/// 缓存处理
    
/// </summary>
    protected bool FileCacheProgress()
    {
        
return FileCacheProgress(falsetrue);
    }

    
/// <summary>
    
/// 重写缓存
    
/// </summary>
    public void FileCacheRewrite()
    {
        FileCacheProgress(
truefalse);
    }

    
/// <summary>
    
/// 缓存处理
    
/// </summary>
    
/// <param name="IsReCache">true强行重写cache</param>
    
/// <param name="IsRewritePage">是否重写输入出页面内容</param>
    
/// <returns></returns>
    private bool FileCacheProgress(bool IsReCache,bool IsRewritePage)
    {
        FileCaches filecaches 
= new FileCaches();
        
try
        {
            filecaches.FileCacheMiniutes 
= 30;
            filecaches.FileExt 
= ".cache";
            filecaches.FileSavePath 
= @"D:\CacheFiles\Test";

            
if (filecaches.CacheProgress(HttpContext.Current, IsReCache, IsRewritePage))
            {
                
return true;
            }
        }
        
catch (Exception ex)
        {
            
throw new Exception(ex.ToString());
        }

        
return false;
    }
    
#endregion

}


FileCaches.cs (Cache主要类)
using System;
using System.Web;
using System.Text;
using System.IO;
using System.Net;

namespace cacheweb.App_code.FileCache
{
    
/// <summary>
    
/// FileCache 文件缓存类 V0.2
    
/// Wathon Team
    
/// http://www.wathon.com
    
/// http://www.cnblogs.com/huacn/archive/2007/11/07/aspnet_page_cache_file.html
    
/// </summary>
    public class FileCaches : FileCacheBase
    {
        
/// <summary>
        
/// 自动处理页面缓存
        
/// 当返回true表示要中断页面的所有内容
        
/// false不要做处理
        
/// 会重Response.Write
        
/// </summary>
        
/// <param name="httpcontext">请传入当前页的HttpContext</param>
        
/// <returns></returns>
        public bool CacheProgress(HttpContext httpcontext)
        {
            
return this.CacheProgress(httpcontext, false,true);
        }

        
/// <summary>
        
/// 自动处理页面缓存
        
/// 当返回true表示要中断页面的所有内容
        
/// false不要做处理
        
/// 会重Response.Write
        
/// </summary>
        
/// <param name="httpcontent">请传入当前页的HttpContext</param>
        
/// <param name="IsReCache">是否强制重写Cahce</param>
        
/// <returns></returns>
        public bool CacheProgress(HttpContext httpcontext, bool IsReCache)
        {
            
return CacheProgress(httpcontext, IsReCache, true);
        }

        
/// <summary>
        
/// 自动处理页面缓存
        
/// 当返回true表示要中断页面的所有内容
        
/// false不要做处理
        
/// </summary>
        
/// <param name="httpcontent">请传入当前页的HttpContext</param>
        
/// <param name="IsReCache">是否强制重写Cahce</param>
        
/// <param name="IsRewritePage">是否重写页面内容 Response.Write 当为False时,只是重新生成静态文件,页面内容不会变动</param>
        
/// <returns></returns>
        public bool CacheProgress(HttpContext httpcontext,bool IsReCache,bool IsRewritePage)
        {
            
if (httpcontext.Request.QueryString["serverget"== "1")
            {
                
return false;
            }

            
string strContent = "";
            
string strUrl = httpcontext.Request.Url.ToString();
            
string strDomain = httpcontext.Request.Url.Host;

            
if (this.ExistCache(strUrl, strDomain) == false || IsReCache == true)
            {
                
//取当前页面的HTML
                strContent = this.GetUrlResponse(strUrl);
                strContent 
+= "\r\n<!-- FileCache By " + DateTime.Now.ToUniversalTime() + " -->";
                
//存缓存
                this.SetCache(strContent, strUrl, strDomain);
            }
            
else
            {

                
//取缓存
                strContent = this.GetCache(strUrl, strDomain);
            }


            
//输出内容,当是重写Cache
            if (IsRewritePage)
            {
                httpcontext.Response.Write(strContent);
                httpcontext.Response.End();
            }
            
            
return true;
        }




        
/// <summary>
        
/// 保存Cache
        
/// </summary>
        
/// <param name="p_Content"></param>
        
/// <param name="p_Url">页面地址</param>
        
/// <param name="p_Domain">域名</param>
        public void SetCache(string p_Content, string p_Url,string p_Domain)
        {
            
string fileNameNoExt = GetFileNameNoExt(p_Url, p_Domain);
            
//写在这里            
            this.SaveFile(fileNameNoExt, p_Content);
        }

        
/// <summary>
        
/// 检查Cache文件是否存在或过期
        
/// </summary>
        
/// <param name="p_Url">页面地址</param>
        
/// <param name="p_Domain">域名</param>
        
/// <returns></returns>
        public bool ExistCache(string p_Url,string p_Domain)
        {
            
string fileNameNoExt = GetFileNameNoExt(p_Url,p_Domain);

            
return this.ExistFile(fileNameNoExt);
        }

        
/// <summary>
        
/// 取Cache,请在使用之间先用 ExistCache 确定Cache存在
        
/// </summary>
        
/// <param name="p_Url">页面地址</param>
        
/// <param name="p_Domain">域名</param>
        
/// <returns></returns>
        public string GetCache(string p_Url, string p_Domain)
        {
            
string strContent = "";
            
string fileNameNoExt = GetFileNameNoExt(p_Url, p_Domain);
            
this.ReadFile(fileNameNoExt, ref strContent);

            
return strContent;
        }
    }

    
/// <summary>
    
/// 文件缓存基类
    
/// By Json Lee 2007-11-07
    
/// </summary>
    public abstract class FileCacheBase 
    {
        
#region 属性定义
        
/// <summary>
        
/// 文件统一的编码格式
        
/// </summary>
        private System.Text.Encoding _FileEncoding = System.Text.Encoding.UTF8;
        
/// <summary>
        
/// 文件统一的编码格式
        
/// </summary>
        public System.Text.Encoding FileEncoding
        {
            
get { return _FileEncoding; }
            
set { _FileEncoding = value; }
        }


        
/// <summary>
        
/// Cache文件存放基本目录
        
/// </summary>
        private string _FileSavePath = @"c:\CacheFiles\";
        
/// <summary>
        
/// Cache文件存放基本目录
        
/// </summary>
        public string FileSavePath
        {
            
get { return _FileSavePath; }
            
set { _FileSavePath = value; }
        }

        
/// <summary>
        
/// 文件扩展名
        
/// </summary>
        private string _FileExt = ".cache";
        
/// <summary>
        
/// Cache文件扩展名
        
/// </summary>
        public string FileExt
        {
            
set { _FileExt = value; }
            
get { return _FileExt; }
        }

        
/// <summary>
        
/// 文件缓存的时间 单位分
        
/// </summary>
        private int _FileCacheMiniutes = 2;
        
/// <summary>
        
/// 文件缓存的时间 单位分
        
/// </summary>
        public int FileCacheMiniutes
        {
            
get { return _FileCacheMiniutes; }
            
set { _FileCacheMiniutes = value; }
        }
        
#endregion

        
/// <summary>
        
/// 检查文件是否存在
        
/// </summary>
        
/// <param name="p_FileName">文件名,不带路径,不带扩展名</param>
        
/// <returns></returns>
        protected bool ExistFile(string p_FileName)
        {
            
bool resultValue = false;
            
try
            {
                
string strFileName = _FileSavePath + p_FileName + _FileExt;
                
if (File.Exists(strFileName))
                {
                    
//文件是否过期
                    DateTime tmFile = File.GetLastWriteTime(strFileName);
                    DateTime tmNow 
= DateTime.Now;
                    TimeSpan ts 
= tmNow - tmFile;
                    
if (ts.TotalMinutes < _FileCacheMiniutes)
                    {
                        resultValue 
= true;
                    }
                }

            }
            
catch (Exception ex)
            {
                
throw new Exception(ex.ToString());
            }

            
return resultValue;
        }

        
/// <summary>
        
/// 读文本文件
        
/// </summary>
        
/// <param name="p_FileName">文件名,不带路径,不带扩展名</param>
        
/// <param name="p_Content">返回用于存放内容的变量</param>
        
/// <returns></returns>
        protected bool ReadFile(string p_FileName, ref string p_Content)
        {
            
bool resultValue = false;
            
if (!this.ExistFile(p_FileName))
            {
                
return resultValue;
            }


            
try
            {
                
if (!Directory.Exists(_FileSavePath))
                {
                    Directory.CreateDirectory(_FileSavePath);
                }

                System.IO.StreamReader sr 
= new StreamReader(_FileSavePath + p_FileName + _FileExt, _FileEncoding);
                p_Content 
= sr.ReadToEnd();
                sr.Close();
                resultValue 
= true;
            }
            
catch (Exception ex)
            {
                
throw new Exception(ex.ToString());
            }

            
return resultValue;
        }

        
/// <summary>
        
/// 保存文本文件
        
/// </summary>
        
/// <param name="p_FileName">文件名,不带路径,不带扩展名</param>
        
/// <param name="p_Content">内容</param>
        
/// <returns></returns>
        protected bool SaveFile(string p_FileName, string p_Content)
        {
            
bool resultValue = false;
            
try
            {
                
if (!Directory.Exists(_FileSavePath))
                {
                    Directory.CreateDirectory(_FileSavePath);
                }

                System.IO.StreamWriter sw 
= new StreamWriter(_FileSavePath + p_FileName + _FileExt, false, _FileEncoding);
                sw.Write(p_Content);
                sw.Close();
                resultValue 
= true;
            }
            
catch (Exception ex)
            {
                
throw new Exception(ex.ToString());
            }

            
return resultValue;

        }


        
/// <summary>
        
/// 根据域名取得无扩展名的文件名
        
/// </summary>
        
/// <param name="p_Url"></param>
        
/// <param name="p_Domain">域名</param>
        
/// <returns></returns>
        protected string GetFileNameNoExt(string p_Url,string p_Domain)
        {
            
string fileNameNoExt = p_Url.Replace("http://"+p_Domain+"/""");
            fileNameNoExt 
= FormatFilename(fileNameNoExt);
            
//处理未带文件名的情况
            if (fileNameNoExt == "")
            {
                fileNameNoExt 
= "default";
            }
            
return fileNameNoExt;
        }

        
/// <summary>
        
/// 取扩展名
        
/// </summary>
        
/// <param name="fileName"></param>
        
/// <returns></returns>
        protected string GetExtension(string fileName)
        {
            
try
            {
                
int startPos = fileName.LastIndexOf(".");
                
string ext = fileName.Substring(startPos, fileName.Length - startPos);
                
return ext.ToLower();
            }
            
catch (Exception ex)
            {
                
//WrongLog.WriteErrorLog(ex.ToString());
                return string.Empty;
            }
        }

        
/// <summary>
        
/// 取有扩展名的文件名
        
/// </summary>
        
/// <param name="p_Url"></param>
        
/// <returns></returns>
        protected string GetFileName(string p_Url)
        {
            
try
            {
                
int startPos = p_Url.LastIndexOf("/"+ 1;
                
string tmpFileName = p_Url.Substring(startPos, p_Url.Length - startPos);
                
return tmpFileName;
            }
            
catch (Exception ex)
            {
                
//WrongLog.WriteErrorLog(ex.ToString());
                return string.Empty;
            }
        }


        
/// <summary>
        
/// 取得URL的页面内容
        
/// </summary>
        
/// <param name="p_PageUrl">URL地址要完整的</param>
        
/// <returns></returns>
        protected string GetUrlResponse(string p_PageUrl)
        {
            
//给URL加入ServerGet的参数,以防止重复循环
            if (p_PageUrl.IndexOf("?"> 0)
            {
                p_PageUrl 
+= "&serverget=1";
            }
            
else
            {
                p_PageUrl 
+= "?serverget=1";
            }

            WebRequest webrequest 
= WebRequest.Create(p_PageUrl);
            
string strContent = "";
            
try
            {
                WebResponse webresponse 
= webrequest.GetResponse();
                Stream stream 
= webresponse.GetResponseStream();
                StreamReader sr 
= new StreamReader(stream, _FileEncoding);

                strContent 
= sr.ReadToEnd();
            }
            
catch (Exception ex)
            {
                
throw new Exception(ex.ToString());
            }

            
return strContent;
        }

        
#region 格式化文件名,替换非法字符
        
/// <summary>
        
/// 格式化文件名,替换非法字符
        
/// </summary>
        
/// <param name="p_fileName">需要格式化的文件名</param>
        
/// <returns>格式化后的文件名</returns>
        protected static string FormatFilename(string p_fileName)
        {
            p_fileName 
= p_fileName.Replace("\\""_");
            p_fileName 
= p_fileName.Replace("/""_");
            p_fileName 
= p_fileName.Replace(":""_");
            p_fileName 
= p_fileName.Replace("*""_");
            p_fileName 
= p_fileName.Replace("?""_");
            p_fileName 
= p_fileName.Replace("\"""_");
            p_fileName = p_fileName.Replace("<""_");
            p_fileName 
= p_fileName.Replace(">""_");
            p_fileName 
= p_fileName.Replace("|""_");
            p_fileName 
= p_fileName.Replace("+""_");
            
return p_fileName.ToLower();
        }
        
#endregion

    }
}

转载于:https://www.cnblogs.com/hugh-lin/archive/2007/11/07/952336.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_765370.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

(转)提高网站速度的最佳实践

(转)提高网站速度的最佳实践 原文来自&#xff1a;http://www.space007.com/post/129.html 相信互联网已经越来越成为人们生活中不可或缺的一部分。ajax&#xff0c;flex等等富客户端的应用使得人们越加“幸福”地体验着许多原先只能在C/S实现的功能。比如Google机会已经把最基…

网站mysql分离_大型网站架构演进(5)数据库读写分离

在使用缓存后&#xff0c;使大部分的数据读操作访问都可以不通过数据库就能完成&#xff0c;但是仍有一部分读操作(包括未命中缓存的&#xff0c;和缓存过期的)和全部的写操作需要访问数据库&#xff0c;当网站的访问量继续增加后&#xff0c;数据库会因为负载压力过高导致成为…

基于PHP的读书分享网站ppt,基于Thinkphpcmf框架开发的网页微信分享自定义标题描述和图片...

之前做过关于《微信转发或分享朋友圈带缩略图、标题和描述的实现方法》的介绍&#xff0c;帮助不少站长实现网站链接分享至微信端自定义简介和图标&#xff0c;最近有一个后台基于Thinkphpcmf框架开发的站长联系到我&#xff0c;用我介绍的方法并没有实现自定义分享&#xff0c…

团购网站号称563人团购实则3人报名...

团购网站号称563人团购实则3人报名... 随着网购日益发达&#xff0c;一种以组织消费者一起购买商品或服务而获得折扣的“团购”网站如雨后春笋般涌入人们的视线。美容美发、餐饮娱乐、家居建材等都是此类网站上常见的团购内容。然而&#xff0c;日前市民李小姐参与团购后却被卖…

HTML日志抓取,如何通过网站日志查看百度蜘蛛抓取情况

我们做SEO都知道&#xff0c;百度用于抓取网页的程序叫做Baiduspider - 百度蜘蛛&#xff0c;我们查看网站被百度抓取的情况主要是分析&#xff0c;网站日志里百度蜘蛛Baiduspider的活跃性&#xff1a;抓取频率&#xff0c;返回的HTTP状态码。我们该如何查看百度蜘蛛的抓取情况…

【网站公告】新Web服务器上线

上次一台Web服务器中暑后&#xff0c;为了保证网站的稳定运行&#xff0c;并进一步提高网站访问速度&#xff0c;我们采购了两台强劲的Dell服务器。 今天&#xff0c;其中一台Web服务器已经部署完毕&#xff0c;正式投入运行。博客程序已运行于新服务器&#xff0c;如果大家发现…

一个网站的诞生- MagicDict未来予想図4 [表格的动态增加行和删除行,完整版]

首先&#xff0c;感谢 路过秋天 开源了他的系统&#xff0c;让园子里的童鞋有了新的研究方向&#xff0c;带动了园子的繁荣&#xff0c;拉动了园子的GDP。 昨天又花了一整天来做在线单词编辑器&#xff0c;动态表格的增加行和删除行的一些问题&#xff0c;基本算是搞明白了&…

div内容横排 html_计算机毕业设计中大学生个人网站案例html

点击上方“蓝字”&#xff0c;关注我们.案例介绍此作品为学生个人主页网页设计题材&#xff0c;代码为简单学生水平 DIV CSS布局制作&#xff0c;整个作品由主页、个人历程、兴趣爱好、学业成绩、联系我们共5页组成&#xff0c;作品下载后可使用任意HTML编辑软件(例如&#xff…

抓取某一个网站整站的记录

经常由于某些原因我们需要爬取某一个网站或者直接复制某一个站点&#xff0c;到网上找了很多工具进行测试&#xff0c;试了很多各有各的问题&#xff0c;最终选择了Teleport Ultra&#xff0c;用起来效果很好&#xff1b;具体的操作手册等东西就不在这里说了&#xff0c;网上搜…

网站中英文转换 php_Markdown 自动添加中英文空格

pangu「有研究顯示&#xff0c;打字的時候不喜歡在中文和英文之間加空格的人&#xff0c;感情路都走得很辛苦&#xff0c;有七成的比例會在 34 歲的時候跟自己不愛的人結婚&#xff0c;而其餘三成的人最後只能把遺產留給自己的貓。畢竟愛情跟書寫都需要適時地留白。與大家共勉之…

如何让sharepoint2010网站根据权限隐藏ribbon

项目要求让普通用户看不到“网站操作”&#xff0c;为了解决该问题&#xff0c;我找了好几篇博客&#xff0c;但都是sharepoint2007&#xff0c;按照sharepoint designer签出&#xff0c;签入&#xff0c;审批&#xff0c;发布。可能是sharepoint2007和sharepoint2010的区别&am…

手机端使用ghelper_手机建站的五个技巧让用户体验得到提升

现今移动设备的使用成为了人们生活中不可或缺的一部分&#xff0c;习惯了在移动端获取信息和购物。所以企业的目光也逐渐转移到移动端&#xff0c;进行移动端建站刻不容缓。但是&#xff0c;移动端网站该如何设计才能获得广大用户的喜爱呢&#xff1f;如何将友好性表达的淋漓尽…

WordPress小工具开发教程(网站公告)

WordPress小工具开发教程&#xff08;网站公告&#xff09; BY TIANQIXIN 2012 年 12 月 26 日 wordpress主题小工具&#xff0c;可以自由拖动到侧边栏&#xff0c;并在前台实现相应功能&#xff01;一般自带的小工具功能有限&#xff0c;我们可以通过自己开发小工具来增强wor…

跳转html时请求头怎么取,爬取网站时请求被拒绝?scrapy轻松解决请求头设置!就是不讲道理...

默认请求头命令行执行&#xff0c;新建爬虫scrapy startproject myspidercd myspider scrapy genspider scrapy_spider httpbin.org我们通过对 https://httpbin.org/get?show_env1 的请求&#xff0c;查看本次请求的浏览器信息&#xff0c;可以打开看一看是否是自己的浏览器信…

seo管理php源码_黑帽SEO,黑帽SEO优化隐身技术(二)

此系统文章总共分为四篇&#xff0c;分别是手法篇、工具篇、隐藏篇、总结篇&#xff1b;本篇为隐身篇&#xff0c;主要介绍黑帽seo中一些隐身的手段。黑帽seo与其他黑产行为不同的是&#xff0c;它需要时间去创造价值。如果是倒卖数据&#xff0c;只需要入侵服务器脱裤走人&…

计算机设置定时原理,可编程定时和计数器-微计算机原理-电子发烧友网站

第四节 可编程定时和计数器在控制系统中,经常需要有一些实时钟以实现实时或延时控制,如定时启动,定时检测,定时通信等,计数器 对外部事件计数.实现这些要求经常有三种方法:(1)设计数字逻辑电路,用硬件实现定时或计数功能,如用NE555芯片实现定时,用74LS163电路实现计数等.(2)软件…

关于算法介绍的一些网站

2019独角兽企业重金招聘Python工程师标准>>> 通过动画的形式展示常见排序算法的排序过程 Sorting Algorithm Animations | Toptal https://www.toptal.com/developers/sorting-algorithms/ 转载于:https://my.oschina.net/ray1421/blog/713796

phpcms选择文件无法加载插件怎么办_网站加速图片优化插件 Smush

如果要推荐一款网站加速图片优化插件&#xff0c;出现在我的推荐名单中应该有 Smush 的身影。别误会&#xff0c;这款插件没用给我广告费用&#xff0c;这篇文章也不是吹捧Smush插件的马屁文章。为了便于一站式集成化操作&#xff0c;所以我在亲测了多款图像压缩优化插件&#…

[网站摘录]数据库查询优化 之 MySQL索引

转载于:https://blog.51cto.com/10237569/1846380

5个基于Linux命令行的下载和网站浏览工具

为什么80%的码农都做不了架构师&#xff1f;>>> Linux命令行是GNU/Linux中最神奇迷人的部分&#xff0c;它是非常强大的工具。命令行本身功能多样&#xff0c;多种内建或者第三方的命令行应用使得Linux变得更加健壮和强大。Linux Shell支持多种不同类型的网络应用&…