tar

linux 命令大全

泪湿孤枕 提交于 2019-12-01 02:02:19
cat /proc/cpuinfo |grep "model name" && cat /proc/cpuinfo |grep "physical id" #linux CPU大小 cat /proc/meminfo |grep MemTotal #内存大小 fdisk -l |grep Disk #硬盘大小 uname -a # 查看内核/操作系统/CPU信息的linux系统信息命令 head -n 1 /etc/issue # 查看操作系统版本,是数字1不是字母L free -m # 查看内存使用量和交换区使用量 df -h # 查看各分区使用情况 du -sh # 查看指定目录的大小 grep MemTotal /proc/meminfo # 查看内存总量 grep MemFree /proc/meminfo # 查看空闲内存量 uptime # 查看系统运行时间、用户数、负载 cat /proc/loadavg # 查看系统负载磁盘和分区 mount | column -t # 查看挂接的分区状态 fdisk -l # 查看所有分区 swapon -s # 查看所有交换分区 hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备) dmesg | grep IDE # 查看启动时IDE设备检测状况网络 ifconfig # 查看所有网络接口的属性

Add files and repertories to a Tar archive with Apache Commons Compress library in non machine dependent way

可紊 提交于 2019-12-01 01:20:59
I'm working on an application that need to create a tar archive in order to calculate his hash. But I encounter some problems : the tar is not the same in different machine, then the hash calculated is different I'm not able to add directories properly If I add an zip file, at the end, in the tar, I have the content off my zip file :/ I have read different post in SO and the dedicated tutorial on apache, and also the source test code of the apache commons compress jar, but I don't get the right solution. Are there anybody that can find where my code is not correct ? public static File

Linux相关命令

这一生的挚爱 提交于 2019-12-01 01:20:52
系统信息 arch 显示机器的处理器架构 uname -m 显示机器的处理器架构 uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI) hdparm -i /dev/hda 罗列一个磁盘的架构特性 hdparm -tT /dev/sda 在磁盘上执行测试性读取操作 cat /proc/cpuinfo 显示CPU info的信息 cat /proc/interrupts 显示中断 cat /proc/meminfo 校验内存使用 cat /proc/swaps 显示哪些swap被使用 cat /proc/version 显示内核的版本 cat /proc/net/dev 显示网络适配器及统计 cat /proc/mounts 显示已加载的文件系统 lspci -tv 罗列 PCI 设备 lsusb -tv 显示 USB 设备 date 显示系统日期 cal 2007 显示2007年的日历表 date 041217002007.00 设置日期和时间 - 月日时分年.秒 clock -w 将时间修改保存到 BIOS 关机 (系统的关机、重启以及登出 ) shutdown -h now 关闭系统 init 0 关闭系统 telinit 0 关闭系统 shutdown -h hours:minutes & 按预定时间关闭系统

untarring files to S3 fails, not sure why

一曲冷凌霜 提交于 2019-12-01 00:56:33
(new information below) I am trying to set up a lambda function that reacts to uploaded tgz files by uncompressing them and writing the results back to S3. The unzip and untar work fine, but uploading to S3 fails: /Users/russell/lambda/gzip/node_modules/aws-sdk/lib/s3/managed_upload.js:350 var buf = self.body.read(self.partSize - self.partBuffer.length) || ^ TypeError: undefined is not a function at ManagedUpload.fillStream (/Users/russell/lambda/gzip/node_modules/aws-sdk/lib/s3/managed_upload.js:350:25) at Entry.<anonymous> (/Users/russell/lambda/gzip/node_modules/aws-sdk/lib/s3/managed

linux常用命令大全

折月煮酒 提交于 2019-11-30 23:15:15
系统信息 arch 显示机器的处理器架构 uname -m 显示机器的处理器架构 uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI) hdparm -i /dev/hda 罗列一个磁盘的架构特性 hdparm -tT /dev/sda 在磁盘上执行测试性读取操作 cat /proc/cpuinfo 显示CPU info的信息 cat /proc/interrupts 显示中断 cat /proc/meminfo 校验内存使用 cat /proc/swaps 显示哪些swap被使用 cat /proc/version 显示内核的版本 cat /proc/net/dev 显示网络适配器及统计 cat /proc/mounts 显示已加载的文件系统 lspci -tv 罗列 PCI 设备 lsusb -tv 显示 USB 设备 date 显示系统日期 cal 2007 显示2007年的日历表 date 041217002007.00 设置日期和时间 - 月日时分年.秒 clock -w 将时间修改保存到 BIOS 关机 (系统的关机、重启以及登出 ) shutdown -h now 关闭系统 init 0 关闭系统 telinit 0 关闭系统 shutdown -h hours:minutes & 按预定时间关闭系统

linux解压缩的常用命令

旧巷老猫 提交于 2019-11-30 22:53:16
1.解包:tar xvf filename.tar, 打包: tar cvf filename DirName 2.解压:gunzip filename.gz, tar zxvf filename.tar.gz; 压缩:gzip filename.gz, tar zcvf filename Dirname; 3.解压:unzip filename.zip; 压缩:zip filename DirName; 解压:rar x fiilename.rar; 压缩:rar a filename.rar Dirname; 4.解压:sEx x filename.* 压缩:sEx a filename DirName;(sEx只是调用相关程序进行解压缩,本身无压缩解压缩功能) 5.重定向到文件:python flename.py > 1.txt 可以将输出结果重定向保存到当前目录的1.txt文件当中 python filename.py >> 1.txt 追加到1.txt文件不覆盖原内容 6.查看服务器性能的命令:vmstat(io,memory,cpu,catch),top(进程占用内存),ps -aux 来源: https://www.cnblogs.com/zhangcnblogs/p/11643757.html

压缩和解压缩

社会主义新天地 提交于 2019-11-30 20:51:20
1、zip格式 [root@localhost~]# zip [选项] 压缩包名 源文件或源目录 选项:   -r  压缩目录 解压缩命令 : unzip [root@localhost~]# unzip [选项] 压缩包名 选项:   -d  指定压缩位置 2、gz格式 [root@localhost~]# gzip [选项] 源文件 选项:   -c  将压缩数据输入到标准输出中,可以用于保留源文件   -d  解压缩   -r  压缩目录 (会把目录下的文件都压缩,目录没有被压缩,不会打包) 注 :压缩之后源文件不保留 解压命令 : gunzip 3、bz2格式 [root@localhost~]# bzip2 [选项] 源文件 选项:   -d  解压缩   -k  压缩时,保留源文件   -v  显示压缩的详细信息 解压命令 :bunzip2 或 bzip2 -d 4、tar格式 tar格式的打包和解压都使用tar命令,区别只是选项不同 [root@localhost~]# tar [选项] [-f 压缩包名] 源文件或源目录 选项:   -c  打包   -f  指定压缩文件的文件名   -v  显示打包文件过程 例 : tar -cvf anaconda-ks.cfg.tar  anaconda-ks.cfg 打包,不会压缩 tar格式的解打包命令 [root

Linux - 常用命令

北城以北 提交于 2019-11-30 20:42:44
Linux - 常用命令 系统信息 关机 (系统的关机、重启以及登出 ) 文件和目录 文件搜索 挂载一个文件系统 磁盘空间 用户和群组 文件的权限 - 使用 "+" 设置权限,使用 "-" 用于取消 文件的特殊属性 - 使用 "+" 设置权限,使用 "-" 用于取消 打包和压缩文件 RPM 包 - (Fedora, Redhat及类似系统) YUM 软件包升级器 - (Fedora, RedHat及类似系统) DEB 包 (Debian, Ubuntu 以及类似系统) APT 软件工具 (Debian, Ubuntu 以及类似系统) 查看文件内容 文本处理 字符设置和文件格式转换 文件系统分析 初始化一个文件系统 SWAP文件系统 备份 光盘 网络 - (以太网和WIFI无线) JPS工具 比较常用的参数: Linux - 常用命令 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI) hdparm -i /dev/hda 罗列一个磁盘的架构特性 hdparm -tT /dev/sda 在磁盘上执行测试性读取操作 cat /proc/cpuinfo 显示CPU info的信息 cat /proc/interrupts

docker image save成tar包,tar包load成image

久未见 提交于 2019-11-30 18:56:45
docker的命令都很简洁,我喜欢。 将一个tar包load成一个image: docker load < my.tar 或者 docker load -i my.tar 将image save成tar包: docker save logmanager:1.0 > logmanager.tar 或者 docker save 1312423bf3ee -o /root/dockerfile/my.tar 简单的命令,用途很多。 来源: CSDN 作者: BobChill 链接: https://blog.csdn.net/BobChill/article/details/83068665

[] tar command

五迷三道 提交于 2019-11-30 18:15:35
problem gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now re: 1. https://www.cnblogs.com/xuliangxing/p/7427375.html ; 2. https://blog.csdn.net/weibin_6388/article/details/47040587 ; end 来源: https://www.cnblogs.com/happyamyhope/p/11634543.html