tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys / --warning=no-file-changed --exclude 是忽略备份的那些目录 proc --没用忽略 lost+found --没用忽略 mnt --没用忽略 sys --没用忽略 本地备份恢复没用试过我迁移了一台 直接准备一台一摸一样的环境进行虚拟机的迁移…
转自:http://www.th7.cn/system/lin/201508/127503.shtml (1)/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行. 并从/etc/profile.d目录的配置文件中搜集shell的设置. (2)/etc/environment:是设置整个系统的环境,而/etc/profile是设置所有用户的环境,前者与登录用户无关,后者与登录用户有关. (3)/etc/bashrc: 为每一个运行bash shell的…
If you are reading this article it means you have a network at home or office with Windows and Linux hosts or have created a virtual network using VirtualBox and need to send files between a Linux host to Windows. File transfer between Linux and Wind…
Linux内核作用: The Linux kernel is the heart of the operating system. It is the layer between the user who works with Linux from a shell environment and the hardware that is available in the computer on which the user is working. The kernel is doing so b…
linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, 驱动开发中设计到的硬件: * 数字电路知识 * ARM硬件知识 * 熟练使用万用表和示波器 * 看懂芯片手册和原理图 4, linux内核源代码目录结构: * arch/: arch子目录包括了所有和体系结构相关的核心代码.它的每一个子目录都代表一种支持的体系结构,例如i386就是关于intel c…
Linux tr命令 Linux tr 命令用于转换或删除文件中的字符. tr 指令从标准输入设备读取数据,经过字符串转译后,将结果输出到标准输出设备. 语法: tr [-cdst][--help][--version][第一字符集][第二字符集] tr [OPTION]…SET1[SET2] 参数说明: -c, --complement:反选设定字符.也就是符合 SET1 的部份不做处理,不符合的剩余部份才进行转换 -d, --delete:删除指令字符 -s, --squeeze-repea…
Linux wc命令用于计算字数. 利用wc指令我们可以计算文件的Byte数.字数.或是列数,若不指定文件名称.或是所给予的文件名为"-",则wc指令会从标准输入设备读取数据. 语法 wc [-clw][--help][--version][文件...] 参数 -c或--bytes或--chars 只显示Bytes数. -l或--lines 只显示列数. -w或--words 只显示字数. --help 在线帮助. --version 显示版本信息. 实例 在默认的情况下,wc将计算指…
how to write your first linux device driver 0. environment-ubuntu 1804 64bit 1. apt-get install linux-headers-$(uname -r) 2. code hello.c #include <linux/init.h> #include <linux/module.h> MODULE_LICENSE("Dual BSD/GPL"); static int he…
上一章回顾:  .NET 跨平台框架Avalonia UI: 填坑指北(一):熟悉UI操作 本篇将要阐述 包括但不仅限于Avalonia及所有Windows到Linux跨平台开发 的一些注意事项: 一.路径问题 1.在平常的WPF(及windows应用软件)开发中,访问文件(懒一点的话)(比如我)通常就直接使用  字符串拼接 举个例子,我们访问软件目录下的\Data\xxx.txt文件: string path = AppDomain.CurrentDomain.BaseDirectory+"\…
查看文件内容 一些重要的目录: /usr/share/    帮助文档.说明文档/var/log/       日志/var/run/       运行中程序/var/tmp       临时文件 根(/)相当于一个入口,文件的总入口,也是唯一入口 bin (sbin) 二进制文件,可执行文件,也可能存在别处,默认使用较多所有用户软连接文件 ----------------命令 sbin 管理员可使用的二进制文件-------------命令ls cd useradd boot 系统内核.启动文…