当我使用 SSH 登录时,我只能看到这个...
-bash: /usr/bin/id: cannot execute binary file
-bash: [: : integer expression expected
Run Code Online (Sandbox Code Playgroud)
我在这里什么也做不了。命令如halt,poweroff,reboot将返回command not found。
我怎样才能解决这个问题?我正在使用 Debian Squeeze Linux
前段时间我读到这aptitude是在基于 Debian 的系统上安装的首选工具。但是当您四处搜索如何管理基于 Debian 的系统时,很少提到 aptitude。大多数人似乎更喜欢apt-get- Debian wiki 页面更是如此!
因此,我想知道我是否错过了什么。哪个是正确使用的工具?
由于手册页没有回答我的问题,而且我不想强制循环,所以我决定在这里提出这个问题。
logrotate 的手册页给出了以下示例:
"/var/log/httpd/access.log" /var/log/httpd/error.log {
rotate 5
mail www@my.org
size 100k
sharedscripts
postrotate
/usr/bin/killall -HUP httpd
endscript
}
Run Code Online (Sandbox Code Playgroud)
所有带有通配符的示例都只包含一个条目。现在,我感兴趣的是是否也允许这样做:
/var/log/httpd/*.log /var/log/httpd/*/*.log {
# ... same as above
}
Run Code Online (Sandbox Code Playgroud)
原因如下:我有多个虚拟主机,我将它们拆分为“拥有”这些虚拟主机的用户。由于日志文件是世界可读的,我想将一个文件夹绑定挂载到用户主目录中,但将其限制为用户“拥有”的日志文件,这是通过将日志分离到文件夹中最容易实现的(并绑定- 无论如何安装都需要该方案)。因此,我正在寻找一种解决方案来轮换该目录下的日志文件/var/log/httpd以及该目录的子目录下的所有日志文件 -无需按名称列出每个子目录。
一般来说,手册页不提供通配符规则是否可能有多个条目或仅用于完整路径的线索。我正在使用 Debian“Squeeze”附带的 logrotate 版本 3.7.8-6,但我认为这不一定特定于发行版或程序版本。
我想知道:为什么 Debian Linux 上有这两个命令,名称和功能都非常相似?这一直让我感到困惑。
我有一个/dev/sda1包含使用 0.6 TB 空间的 NTFS 分区的卷(1.2 TB)。
我想ext4在剩余的 0.6 TB 空间中进行分区。
我还没有尝试过任何东西,因为我不想在输入错误命令时冒丢失数据的风险。(我不能使用 gparted,因为我没有 GUI。)
你能给我提供正确的命令,或者至少为mkfs.ext4.
root@rasp:~# fdisk -l /dev/sda
Disk /dev/sda: 1500.3 GB, 1500299395072 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930272256 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
Disk identifier: 0x000303ee
Device Boot Start End Blocks Id System
/dev/sda1 2048 2930272255 1465135104 …Run Code Online (Sandbox Code Playgroud) 我正在尝试运行命令 docker-compose build
我得到这个输出:
Step 4/8 : RUN apt-get update && apt-get install -y google-chrome-stable
---> Running in ee9551cd38b9
Ign http://dl.google.com stable InRelease
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
.....
Get:9 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
W: Fetched 10.1 MB in 6s (1519 kB/s)
Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead. …Run Code Online (Sandbox Code Playgroud) 我试过在 Debian 上安装 dig,但 apt-get 实用程序似乎不知道它是什么。
它是一些更大的软件包的一部分吗?我在哪里可以找到这个?
我i386在我的 Debianamd64安装中添加了外国架构。如何删除它?当我尝试这个命令时:dpkg --remove-architecture i386,我被告知首先删除所有i386包。
使用 APT,您可以使用以下命令安装特定版本的软件包:
apt-get install package=1.0
Run Code Online (Sandbox Code Playgroud)
但你做不到
apt-get install package=1.*
Run Code Online (Sandbox Code Playgroud)
那么,我如何才能找出package特定存储库或我的所有存储库中的哪些版本可用/etc/apt/sources.list?
找出我正在使用的 Debian 软件包架构的命令是什么?
例如,在64位x86,我期望类似的东西amd64,i386在32位x86和darwin-x86_64从OSX 10.6(通过Fink)。
debian ×10
linux ×6
aptitude ×2
32-vs-64-bit ×1
apt ×1
apt-get ×1
bash ×1
dig ×1
docker ×1
ext4 ×1
filesystems ×1
logging ×1
logrotate ×1
packages ×1
partitioning ×1
repository ×1
ssh ×1
ubuntu ×1