小编Ham*_*ava的帖子

如何在命令行中取消设置变量?

我尝试了以下命令来设置代理yaourt

export ALL_PROXY=http://proxy.example.com:8080
Run Code Online (Sandbox Code Playgroud)

问题是如何取消设置代理yaourt?通常,如何取消设置当前 shell 中变量的值?

shell yaourt

146
推荐指数
2
解决办法
24万
查看次数

如何在 Arch Linux 中更新 GRUB

在 Ubuntu 中,我们使用这个命令来更新 GRUB:

# update-grub
Run Code Online (Sandbox Code Playgroud)

但是如何在 Arch Linux 中更新 GRUB 2.00版?

arch-linux grub2

76
推荐指数
1
解决办法
20万
查看次数

重命名文件的最快方法,无需重新键入目录路径

我知道如何在 Unix 中重命名文件:

$ mv ~/folder/subfolder/file.txt ~/folder/subfolder/file.sh

     ^-------this part------^    ^------this part-------^
Run Code Online (Sandbox Code Playgroud)

重复~/folder/subfolder/file两次需要很长时间。

有没有更快的方法?

rename mv

58
推荐指数
4
解决办法
4万
查看次数

如何找出文件是硬链接还是符号链接?

我有一个文件在~/file.txt.

我通过以下方式创建了硬链接:

ln ~/file.txt ~/test/hardfile.txt
Run Code Online (Sandbox Code Playgroud)

和一个符号链接文件:

ln -s ~/file.txt ~/test/symfile.txt
Run Code Online (Sandbox Code Playgroud)

现在,

  1. 我怎样才能找出哪个文件是硬链接?
  2. 如何找出哪个文件后面的硬链接?

我们可以通过 找到符号链接文件->,但是硬链接呢?

在此处输入图片说明

filesystems hard-link symlink

23
推荐指数
2
解决办法
4万
查看次数

`/var/crash/` 中有哪些文件?

我知道当程序崩溃时,一些文件会在/var/crash/. 但我不知道这些文件是什么!

那是错误日志吗?

logs directory-structure crash

19
推荐指数
2
解决办法
4万
查看次数

`错误:没有这样的设备...` 安装 Arch Linux 后

我看过很多关于这个错误的帖子,但我找不到解决方案。我已经在 Windows 8 旁边安装了 Arch Linux。(双启动)。

我完全按照此视频进行操作,但在20:35出现以下错误。重新启动后,我得到:

error: no such device: ad4103fa-...
Loading Linux core repo kernel...
error: file `/boot/vmlinuz-linux` not found
Loading initial ramdisk ...
error: you need to load the kernel first.
Run Code Online (Sandbox Code Playgroud)

任何帮助都会很棒。

arch-linux grub2 system-installation

9
推荐指数
1
解决办法
2万
查看次数

打印所有不包含标点符号的行

我想要一个可以打印所有不包含标点符号的行的正则表达式模式:

输入 :

.This is line 1
This is ! line 2
This is line (3)
This is line 4
Run Code Online (Sandbox Code Playgroud)

输出:(应该是)

This is line 4
Run Code Online (Sandbox Code Playgroud)

到目前为止我尝试过的:

grep '[^[:punct:]]' file.txt
Run Code Online (Sandbox Code Playgroud)

但它显示了所有不是标点符号的字符。

grep regular-expression

8
推荐指数
1
解决办法
1万
查看次数

如何删除最后一个斜杠的下一个单词

我有以下路径:

$ vim /path/to/some/where
Run Code Online (Sandbox Code Playgroud)

如果我按Ctrl+ w,它会将整个文本删除到第一个空格。结果是:

$ vim 
Run Code Online (Sandbox Code Playgroud)

如何使用组合键删除最后一个斜杠的下一个单词?

bash keyboard-shortcuts line-editor

8
推荐指数
1
解决办法
2710
查看次数

无法在 GenyMotion 模拟器中运行设备

我已经从 AUR 安装了 GenyMotion 及其依赖项(Virtual Box,...)。现在我正在尝试在 GenyMotion 模拟器中运行一个设备,但出现以下错误:

无法加载 VirtualBox 引擎。在启动 Genymotion 之前,请确保您已正确安装它。更多信息请参考:https : //cloud.genymotion.com/page/faq/#vbox

在此处输入图片说明

附注:

您可以在~/.Genymobile/genymotion-player.log以下位置看到日志内容:

Jan 7 13:19:58 [Genymotion Player] [Error] VBoxManage ("hostonlyif", "create") returns 1 
Jan 7 13:19:58 [Genymotion Player] [Error] Output command: "0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: …
Run Code Online (Sandbox Code Playgroud)

arch-linux android

6
推荐指数
1
解决办法
9070
查看次数

格式化闪存盘的问题

我已使用以下命令将 Arch Linux ISO 文件安装到闪存盘中:

dd bs=2M if=~/archlinux-2013.11.01-dual.iso of=/dev/sdd
Run Code Online (Sandbox Code Playgroud)

现在我正在尝试使用以下命令格式化闪存盘:

sudo mkfs.vfat -F 32 /dev/sdd
Run Code Online (Sandbox Code Playgroud)

但它让我出现以下错误:

mkfs.vfat:预期的设备分区,不会在整个设备“/dev/sdd”上创建文件系统(使用 -I 覆盖)

的输出sudo fdisk -l

Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf3286bd2

Device    Boot     Start       End    Blocks  Id System
/dev/sda1 *    119700315 154850534  17575110  83 Linux
/dev/sda2       19834880 119700314 …
Run Code Online (Sandbox Code Playgroud)

partition arch-linux flash-memory mkfs

4
推荐指数
1
解决办法
6153
查看次数