93 cd /opt
94 pwd
95 ls

96 mkdir tmp
97 ls
98 cd tmp/
99 touch t1.txt
100 ls
101 tree /opt

114 vim t1.txt
115 vi t1.txt
116 vim t1.txt
117 vim newfile
118 cd /boot/grub2/
119 ls
120 cat /boot/grub2/grub.cfg
122 cat /boot/grub2/grub.cfg > /opt/tmp/newfile
123 cat /opt/tmp/newfile
[root@server grub2]# cd /opt/tmp/
[root@server tmp]# ls
newfile newgile t1.txt ti.txt
[root@server tmp]# vim newfile
、、、
1 set pager=1
2
3 if [ -f {config_directory}/grubenv
5 elif [ -s {next_entry}" ] ; then
9 set default="{saved_entry}"
15 fi
16
17 if [ x"{prev_saved_entry}" ]; then
26 set saved_entry="{boot_once}" ]; then
35 saved_entry="feature_all_video_module = xy ]; then
42 insmod all_video
43 else
44 insmod efi_gop
45 insmod efi_uga
46 insmod ieee1275_fb
47 insmod vbe
48 insmod vga
49 insmod video_bochs
50 insmod video_cirrus
51 fi
52 }
53
54 terminal_output console
55 if [ x{prefix}/user.cfg ]; then
65 source {GRUB2_PASSWORD}" ]; then
67 set superusers="root"
68 export superusers
69 password_pbkdf2 root {boot_counter}" -a "
{boot_counter}" = "0" -o "
feature_platform_search_hint = xy ]; then
86 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-bar emetal=ahci0,gpt2 38ebf4ea-25a0-4bb4-8ec7-211893e7d748
87 else
88 search --no-floppy --fs-uuid --set=root 38ebf4ea-25a0-4bb4-8ec7-211893e7d748
89 fi
90 insmod part_gpt
91 insmod fat
92 set boot='hd0,gpt1'
93 if [ x{kernelopts}" ]; then
100 set kernelopts="root=/dev/mapper/rhel-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet "
101 fi
102
103 insmod blscfg
104 blscfg
105 if [ "{boot_indeterminate}" = "1" ]; then
106 set menu_hide_ok=1
107 else
108 set menu_hide_ok=0
109 fi
110 if [ "{boot_indeterminate}" = "1" ]; then
113 set boot_indeterminate=2
114 fi
115 set boot_success=0
116 save_env boot_success boot_indeterminate
117
118 if [ x{menu_show_once}" ]; then
120 unset menu_show_once
121 save_env menu_show_once
122 set timeout_style=menu
123 set timeout=60
124 elif [ "{menu_hide_ok}" = "1" ]; then
125 set orig_timeout_style={timeout}
127 if [ "feature_timeout_style = xy ]; then
137 if [ "{menu_show_once_timeout}"
140 unset menu_show_once_timeout
141 save_env menu_show_once_timeout
142 fi
143 fi
144 if [ "menuentry_id_option 'uefi-firmware' {
146 fwsetup
147 }
148 fi
149 if [ -f {config_directory}/custom.cfg
151 elif [ -z "prefix/custom.cfg ]; then
152 source $prefix/custom.cfg
153 fi
、、、