在 Nano 中编辑 authorised_keys 文件时,我想换行长行以便我可以看到行尾(即告诉它是谁的密钥)。基本上我希望它看起来像输出cat authorised_keys
所以,我点击了Esc + L哪个是在我的平台上启用长行换行的元键,我看到消息说长行换行已启用,但行没有按我预期的那样换行。
我在 OSX 10.8.5 上使用终端
我有一些很长的日志文件。我可以使用 来查看最后几行tail -n 50 file.txt,但有时我需要编辑最后几行。
查看文件时如何直接跳到文件末尾nano?
很多时候我用 nano 编辑文件,尝试保存并获得权限错误,因为我忘记以 sudo 身份运行它。有什么快速的方法可以让我成为 sudo 而不必重新打开和重新编辑文件吗?
前几天在尝试从 Nano 中保存文件时,我收到一条错误消息,提示“XOFF 被忽略,mumble mumble”。我不知道那是什么意思。任何见解?
CoreOS 不包含包管理器,但我首选的文本编辑器是nano, notvi或vim. 有没有办法解决?
gcc 不可用,因此无法从源代码编译:
core@core-01 ~/nano-2.4.1 $ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking for style of include used by make... none
checking for gcc... no
checking for …Run Code Online (Sandbox Code Playgroud) 安装 Debian Stretch (9.3)。安装 Vim 并删除 Nano。Vim 被选为默认编辑器。
每次运行时crontab -e,都会收到以下警告:
root@franklin:~# crontab -e
no crontab for root - using an empty one
/usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
/usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
/usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
No modification made
Run Code Online (Sandbox Code Playgroud)
我试过重新配置sensible-utils包,但它没有提供任何输入(表明无论它做什么都成功),但警告仍然出现。
root@franklin:~# dpkg-reconfigure sensible-utils
root@franklin:~#
Run Code Online (Sandbox Code Playgroud)
虽然这些警告并没有阻止我做任何事情,但我觉得它们很烦人。我怎样才能摆脱它们?
我在 Mac 上将 vim 作为默认编辑器,每次我在 Mac 终端上运行命令时,它都会自动打开“vim”。
我该如何设置“nano”并确保每次需要时终端都会打开“nano”?