我有一个可怕的情况,我必须在救援 Debian Linux 中从损坏的突袭系统中恢复数据。我只想以只读方式将它们全部挂载到 /mnt/rescue 以便能够将 VMWare GSX 映像复制到另一台机器并稍后将它们迁移到 ESXi。相关命令的输出如下。
fdisk -l
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e687
Device Boot Start End Blocks Id System
/dev/sda1 1 523 4200997 fd Linux raid autodetect
/dev/sda2 524 785 2104515 fd Linux raid autodetect
/dev/sda3 786 182401 1458830520 …Run Code Online (Sandbox Code Playgroud) 我运行以下命令。
ps -e -o args | grep destiny | grep UNIX
Run Code Online (Sandbox Code Playgroud)
我收到以下输出。
/path/to/destiny -r -m UNIX -t TCP -p 1501
Run Code Online (Sandbox Code Playgroud)
我可以使用什么命令来获取打印参数的值(例如-mor-t或-p)?我想实现以下目标。
ps -e -o args | grep destiny | grep UNIX | <someCommand> -p 这应该打印 1501
ps -e -o args | grep destiny | grep UNIX | <someCommand> -m 这应该打印 UNIX
ps -e -o args | grep destiny | grep UNIX | <someCommand> -t 这应该打印 TCP
请注意-p,-m或-t可能会切换列,因此awk …