linux常用命令备份

Linux常用命令日志清理和数据备份 (如自动化脚本、容器化部署)。这不仅展示了技术能力,也体现了对项目需求的适应能力和持续学习的态度。通过具体案例展示你在Linux系统中的应用能力,可以有效体现专业水平。(如文件操作、网络诊断)、(如用户权限、进程监控)和。 阅读详情

1. 压缩命令

$ tar -cvf /tmp/etc.tar /etc <==仅打包,不压缩!     
$ tar -zcvf /tmp/etc.tar.gz /etc <==打包后,以 gzip 压缩     
$ tar -jcvf /tmp/etc.tar.bz2 /etc <==打包后,以 bzip2 压缩

2. 查看内核/操作系统/CPU信息

$ uname -a*

3. 查看操作系统版本

$ head -n 1 /etc/issue*

4. 查看CPU信息

$ cat /proc/cpuinfo

5. 查看计算机名

$ hostname

6. 列出所有PCI设备

$ lspci -tv

7. 列出所有USB设备

$ lsusb -tv

8. 列出加载的内核模块

$ lsmod

9. 查看环境变量资源

$ env

10. 查看内存使用量和交换区使用量

$ free -m ---->-m 数字以MByte为单位 ;-g数字以GByte为单位

11. 查看各分区使用情况

$ df -h

12. 查看指定目录的大小

$ du -sh <目录名> 
$ du -h --max-depth=1 /

13. 查看内存总量

$ grep MemTotal /proc/meminfo

14. 查看空闲内存量

$ grep MemFree /proc/meminfo

15. 查看系统运行时间、用户数、负载

$ uptime

16. 查看系统负载磁盘和分区

$ cat /proc/loadavg

17. 查看挂接的分区状态

$ mount | column -t

18. 查看所有分区

$ fdisk -l

19. 查看所有交换分区

$ swapon -s

20. 查看磁盘参数(仅适用于IDE设备)

$ hdparm -i /dev/hda

21. 查看启动时IDE设备检测状况网络

$ dmesg | grep IDE

22. 查看所有网络接口的属性

$ ifconfig -a

23. 查看防火墙设置

$ iptables -L

24. 查看路由表

$ route -n

25. 查看所有监听端口

$ netstat -lntp

26. 查看所有已经建立的连接

$ netstat -antp

27. 查看网络统计信息进程

$ netstat -s

28. 查看所有进程

$ ps -ef

29. 实时显示进程状态用户

$ top

30. 查看活动用户

$ w

31. 查看指定用户信息

$ id <用户名>

32. 查看用户登录日志

$ last

33. 查看系统所有用户

$ cut -d: -f1 /etc/passwd

34. 查看系统所有组

$ cut -d: -f1 /etc/group

35. 查看当前用户的计划任务服务

$ crontab -l

36. 列出所有系统服务

$ chkconfig –list

37. 列出所有启动的系统服务程序

$ chkconfig –list | grep on

38. 查看所有安装的软件包

$ rpm -qa

39. 发送url请求

$ curl -v --data-urlencode "name=I am Daniel" http://www.example.com

40. 远程同步文件夹

$ rsync -vr --progress -e ssh root@192.168.1.xxx:/cn/appdir/java/usercenter/ROOT/* /databack/experiment/rsync

41. 查看linux前十位的内存占用进程

$ ps -aux | sort -k4nr | head -10

42. .tar.bz2格式解压

$ tar -jxvf xxx.tar.bz2

43. 在不解压gzip包的情况下, grep文件内容

$ gzip -dc myfile.gz | grep abc

44. 取linux系统前一天的日期

$ date -d'-1 day' +'%Y%m%d'

45. 查看centos系统版本

$ cat /etc/redhat-release
Linux 备份与恢复常用命令 在 Linux 系统运维中,备份与恢复是保障数据安全的核心环节 —— 无论是日常文件误删、配置文件篡改,还是系统崩溃,可靠的备份策略和熟练的命令使用都能快速恢复数据。本文按「文件 / 目录备份」「压缩备份」「系统级备份」「增量 / 差异备份」四大核心场景,整理常用命令及实操示例,兼顾基础用法与进阶技巧。 阅读详情

相关推荐

易灵思FPGA实战:T35F324的PLL硬核配置全流程(附避坑指南)

本文详细解析了易灵思T35F324 FPGA中硬核PLL的配置全流程与核心避坑点。内容涵盖从架构理解、Interface Designer参数设置、VCO范围校验,到时钟网络冲突分析与动态重配置等实战环节,重点解决了引脚分配、资源约束和常见报错问题,为工程师提供了一套清晰可靠的配置指南。

u9v0w的博客 215

Linux常用命令,备份,方便查询

cd命令 cd /root/Docements # 切换到目录/root/Docements       cd ./path          # 切换到当前目录下的path目录中,“.”表示当前目录         cd ../path         # 切换到上层目录中的path目录中,“..”表示上一层目录  ls命令     -l :列出长数据串,包含文件的属性与权限数

qq_24469383的博客 511

江科大笔记—OLED调试工具

OLED介绍及调试工具

m0_62005595的博客 658

linux整个系统备份命令(随记)

tar cvpzf backup.tar.gz(备份的文件名) --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.gz(排除备份文件) --exclude=/mnt --exclude=/sys --exclude=/media /(备份位置)

weixin_42140826的博客 1452

红外:非均匀性校正01_基本原理与基本方法

非均匀校正(nonuniformity correction,NUC) 基本原理 这里要表达的意思就是:图中每一条直线对应一个像素点的,亮度/辐照度的情况。由于硬件的关系,每一个像素点的线性响应很不一样,所以需要通过矩阵来校正。 校正原理: 一点校正 两点校正 其他原理介绍: 参考链接: 基于多项式拟合的红外焦平面非均匀校正 课件:光电成像——非均匀性校正 红外图像非均匀性校正相关汇总 红外非均匀性校正算法总结 红外图像非均匀矫正——一点矫正 ...

dlvector的博客 2万+

【技术实践指南】Python解析FactSet Revere供应链数据:构建企业级断裂与重构监测指标

本文提供了一份企业级Python实践指南,详细解析如何利用FactSet Revere供应链数据库,构建供应链断裂与重构监测指标。内容涵盖数据清洗、关系对筛选、时间序列处理及核心指标(断裂、恢复、转移)的工程化实现,旨在帮助数据工程师与分析师搭建自动化、可解释的供应链风险监控系统。

weixin_29051811的博客 932

linux 备份文件命令

linux 备份文件命令

xie__jin__cheng的博客 4317

POST 接口,将参数拼接到 URL 上,而不是将其作为表单数据发送

POST 接口,将参数拼接到 URL 上,而不是将其作为表单数据发送

pig_ning的博客 3146

【Linux使用】Linux备份与恢复的命令和使用方式:保障数据安全和业务连续性

tar命令可以将多个文件或目录打包成为一个文件,并压缩成.tar.gz 或 .tar.bz2的格式,常用于备份或传输文件。以上是常用的Linux备份与恢复命令和使用方式,可以根据实际需求选择合适的工具和方法进行备份和恢复操作。dd命令可以备份和还原磁盘分区和整个磁盘,使用时需注意,错误操作可能导致数据丢失。rsync命令可以通过网络同步本地和远程主机的文件和目录,常用于增量备份。scp命令可以通过加密的方式传输文件和目录,也可用于备份和恢复操作。

瞎折腾的男人 1192

华为od 面试八股文_测试/测试开发_05_含答案

华为od 面试八股文_测试/测试开发_05_含答案

MISAYAONE的博客 2558

华为OD机试 - 物流仓储多维度成本利润综合查询系统 - 二维数组(Python/JS/C/C++ 新系统 100分)

本专栏收录于《华为OD机试真题(Python/JS/C/C++)》。刷的越多,抽中的概率越大,私信哪吒,备注华为OD,加入华为OD刷题交流群,每一题都有详细的答题思路、详细的代码注释、3个测试用例、为什么这道题采用XX算法、XX算法的适用场景,发现新题目,随时更新。某物流企业在全国多个仓库开展仓储业务,需要对不同仓库、不同时段的入库成本、出库收入和库存损耗进行综合统计分析,用于生成 日报、周报和月报。字段说明及取值范围如下:warehouses: int[] 扁平化数组 [w0d0in, w0d0out,

学Java,找哪吒 309

Linux常用命令

开发运维过程中我们经常要用到一些linux脚本,现在提供给大家参考一下

u010089926的博客 1574

机械式激光雷达实现原理以及特性总结

本文介绍了机械式激光雷达的技术原理和核心特性。该技术通过机械旋转结构实现360°三维扫描,采用飞行时间法测距并生成点云数据。核心优势包括全向扫描、长距高精度和成熟度高,但存在体积大、成本高、可靠性受限等局限。典型应用于自动驾驶测试车、测绘建模等领域。与固态激光雷达相比,机械式在视场角和探测距离方面有优势,但在体积、成本和可靠性方面处于劣势。该技术目前主要应用于对成本不敏感的专业场景。

start_up_go的博客 262

linux命令大全查询备份,LINUX常用命令操作方法介绍

LINUX常用命令操作方法介绍LINUX常用命令大全1.1文件内容查询命令grep、fgrep、egrep语法:grep[选项][查找模式][文件名1,文件名2,……]选项:-E每个模式作为一个扩展的正则表达式对待-F每个模式作为一组固定字符串对待,而不作为正则表达式-i比较时不区分大小写-l显示首次匹配匹配串所在的文件名并用换行符将其分开。当在文件中多次出现匹配串时,不重复显示次文件名;-x只显...

weixin_39890652的博客 283

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Linux常用命令及db2备份远程数据库中的表数据

Linux常用命令及db2备份远程数据库中的表数据 实习期间导师分配了一个搭建db2数据库,并备份某远程数据库的表数据,记录一下。 Linux常用命令。 ps 命令。主要用来查看某线程的运行情况,大多数情况下与grep混合使用。 ps -aux | grep java // -aux显示所有状态 ps -ef | grep java // 表示查看所有进程里CMD是java的进程信息 kill命令终止进程 kill -9 [PID] top命令可以实时显示各个线程情况。要在top输出中开启线

whx_0612的博客 490

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Linux常用命令备份

1:查看内存状态 ps aux | sort -k4nr | head -n 10 top M 2.动态查看日志文件 tail -f log 3.重定向输出相关 ./cv2xdemo -v 0 > test.log command > /dev/null command > /dev/null 2>&1 //stdout和stderr重定向到相同文件; command > file 2>&1 4.更改权限 chmod 777 cv2

xiongxiangpost的专栏 496

linux查询备份,Linux常用命令,备份,方便查询

cd命令cd /root/Docements # 切换到目录/root/Docementscd ./path # 切换到当前目录下的path目录中,“.”表示当前目录cd ../path # 切换到上层目录中的path目录中,“..”表示上一层目录ls命令-l :列出长数据串,包含文件的属性与权限数据等-a :列出全部的文件,连同隐藏文件(开头为.的文件)一起列出...

weixin_33634121的博客 1187

Linux或Unix系统备份与恢复常用命令

系统备份与恢复常用命令 1. fbackup & frecover A、系统备份命令: fbackup 1) fbackup的常用方式一: [1] 进入单用户: # init –s 或 # shutdown 0 [2] 系统全备份 # fbackup –f /dev/rmt/0m -0iv / -I /tmp/sysbk.index -f : 设备文件名 ...

agol83082486的博客 1013

linux mmcb 备份,Linux常用命令(备份与压缩命令 )

Linux备份与压缩命令tar命令tar可以为文件和目录创建档案。利用tar,用户可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文件。tar最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案,如软盘。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这对于备份文件或将几个文件组合成为一个文件以便于网络传输是非常有用的。Linux上的tar...

weixin_29100399的博客 258

LINUX入门常用命令之备份与压缩

Linux备份与压缩命令     tar命令tar可以为文件和目录创建档案。利用tar,用户可以为某一特定文件创建档案(备份文件),也可以在档案中改变文件,或者向档案中加入新的文件。tar最初被用来在磁带上创建档案,现在,用户可以在任何设备上创建档案,如软盘。利用tar命令,可以把一大堆的文件和目录全部打包成一个文件,这对于备份文件或将几个文件组合成为一个文件以便于网络传输是非常有用的。L

Opossum的专栏 1042

linux计算文件空白行个数_云计算开发知识点:Linux文件备份及恢复文档常用命令...

对于云计算人才来说,及时的备份文档资料非常重要,若不备份或误删文档,后期查找恢复起来将会是一个大工程。不过随着开源软件的不断升级更新,文件备份变得很容易,今天的广州云计算老师就给大家讲解一下Linux文件备份及恢复文档常用的命令。在Linux系统中,文件备份及恢复常用的命令包括cp、dump、estore。​一、cp文件的备份,语法格式:cp[参数][源文件或目录][目标目录] 或cp[选项][源...

weixin_35508482的博客 237

Linux 系统备份常用命令

vdump的常用方式: 1). 对于文件需要在只读方式下备份的文件,建议进入单用户: # init s 或 >>>boot –fl s 2). 对操作系统各MOUNT点进行备份 3). # mount -a # vdump -0uvf /dev/ntape/tape0_d1 / # vdump -0uvf /dev/ntape/tape0_d1 /usr ...

I am diving . . . 429
上一篇: spring mvc环境配置spring-data-redis进行应用多实例间session共享
下一篇: springboot项目添加powermock遇到的StackTraceCleanerProvider问题
一装到底
博客等级 码龄18年 13粉丝 26原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值