当前位置:网站首页>nc基础用法4
nc基础用法4
2022-04-23 19:47:00 【franket】
[[email protected] nc]# mkdir /mnt/testboot
[[email protected] nc]# mount -o loop /tmp/nc/h102.boot.backup /mnt/testboot/
[[email protected] nc]# cd /mnt/testboot/
[[email protected] testboot]# ls
config-2.6.32-504.el6.x86_64 initramfs-2.6.32-504.el6.x86_64.img symvers-2.6.32-504.el6.x86_64.gz
efi initrd-2.6.32-504.el6.x86_64kdump.img System.map-2.6.32-504.el6.x86_64
grub lost+found vmlinuz-2.6.32-504.el6.x86_64
[[email protected] testboot]# cd grub/
[[email protected] grub]# ls
device.map fat_stage1_5 grub.conf jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
[[email protected] grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_temp-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vg_temp-lv_root rd_LVM_LV=vg_temp/lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_temp/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img
[[email protected] grub]#
[[email protected] grub]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_temp-lv_root
50G 7.9G 39G 17% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 477M 34M 419M 8% /boot
/dev/mapper/vg_temp-lv_home
5.4G 12M 5.1G 1% /home
/tmp/nc/h102.boot.backup
477M 34M 419M 8% /mnt/testboot
[[email protected] grub]#
远程控制
[[email protected] nc]# mkfifo /tmp/cmd_fifo
[[email protected] nc]# ll /tmp/cmd_fifo
prw-r--r-- 1 root root 0 Nov 17 22:29 /tmp/cmd_fifo
[[email protected] nc]# cat /tmp/cmd_fifo | /bin/bash -i 2>&1 | nc -l 6789 > /tmp/cmd_fifo
----------
[[email protected] grub]# nc h102 6789
[[email protected] nc]#
[[email protected] nc]# ls
ls
abc
file.txt
tmp
xx
[[email protected] nc]# ls -l
ls -l
total 44
-rw-r--r-- 1 root root 662 Nov 17 19:35 abc
-rw-r--r-- 1 root root 10 Nov 17 21:53 file.txt
drwxr-xr-x 3 root root 4096 Nov 17 19:40 tmp
-rw-r--r-- 1 root root 30720 Nov 17 19:40 xx
[[email protected] nc]# echo "NB"
echo "NB"
NB
[[email protected] nc]# hostname
hostname
h102.temp
[[email protected] nc]# ip a
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b6:a8:f8 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.80/24 brd 192.168.2.255 scope global eth3
inet6 fe80::20c:29ff:feb6:a8f8/64 scope link
valid_lft forever preferred_lft forever
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b6:a8:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.102/24 brd 192.168.100.255 scope global eth2
inet6 fe80::20c:29ff:feb6:a802/64 scope link
valid_lft forever preferred_lft forever
[[email protected] nc]#
版权声明
本文为[franket]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/1986162
边栏推荐
- MySQL数据库 - 连接查询
- MySQL lock
- VeraCrypt文件硬盘加密使用教程
- 仓库管理数据库系统设计
- MySQL syntax collation (3)
- 2021-2022-2 ACM training team weekly Programming Competition (8) problem solution
- 山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(七)
- Kubernetes introduction to mastery - ktconnect (full name: kubernetes toolkit connect) is a small tool based on kubernetes environment to improve the efficiency of local test joint debugging.
- MySQL syntax collation (2)
- Mysql database - single table query (III)
猜你喜欢

如何在BNB鏈上創建BEP-20通證

Software College of Shandong University Project Training - Innovation Training - network security shooting range experimental platform (8)

How to create bep-20 pass on BNB chain

Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (6)

FFT物理意义: 1024点FFT就是1024个实数,实际进入fft的输入是1024个复数(虚部为0),输出也是1024个复数,有效的数据是前512个复数

LeetCode异或运算

The textarea cursor cannot be controlled by the keyboard due to antd dropdown + modal + textarea

【文本分类案例】(4) RNN、LSTM 电影评价倾向分类,附TensorFlow完整代码

山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(六)

深度分析数据恢复原理——那些数据可以恢复那些不可以数据恢复软件
随机推荐
Pit encountered using camera x_ When onpause, the camera is not released, resulting in a black screen when it comes back
The most detailed network counting experiment in history (2) -- rip experiment of layer 3 switch
MySQL syntax collation (2)
kibana 报错 server is not ready yet 可能的原因
Kubernetes getting started to proficient - install openelb on kubernetes
MySQL 进阶 锁 -- MySQL锁概述、MySQL锁的分类:全局锁(数据备份)、表级锁(表共享读锁、表独占写锁、元数据锁、意向锁)、行级锁(行锁、间隙锁、临键锁)
C语言的十六进制printf为何输出有时候输出带0xFF有时没有
【2022】将3D目标检测看作序列预测-Point2Seq: Detecting 3D Objects as Sequences
Steps to build a deep learning environment GPU
[报告] Microsoft :Application of deep learning methods in speech enhancement
MySQL syntax collation (3)
什么是消息队列
DevOps集成-Jenkins 服务的环境变量和构建工具 Tools
Speex Wiener filter and rewriting of hypergeometric distribution
Go three ways to copy files
Unity general steps for creating a hyper realistic 3D scene
数据库查询 - 选课系统
Prefer composition to inheritance
指针数组与数组指针的区分
antd dropdown + modal + textarea导致的textarea光标不可被键盘控制问题