将系统中的/etc/fonts/conf.d目录中的所有文件(注意:不是/etc/fonts/conf.d目录)打包压缩为当前用户(shiyanlou)家目录下的fonts.tar.gz文件.
时间: 2023-12-09 08:05:00 浏览: 219
可以使用以下命令来完成你的要求:
```
tar -czvf ~/fonts.tar.gz /etc/fonts/conf.d/*
```
这个命令会将/etc/fonts/conf.d目录中的所有文件打包压缩为fonts.tar.gz文件,并保存到当前用户(shiyanlou)的家目录下。请注意,这个操作需要使用sudo权限。
相关问题
在/tmp目录下创建一个test目录,让其拥有者为nbcc,从属用户组为shiyanlou并拥有者对test目录拥有全部权限,组用户拥有读、执行权限,其它的用户无权限; 将位于当前用户(shiyanlou)家目录下的source.tar.gz压缩文件中所有的后缀名为.c的文件解压并解包到步骤1中创建的的test目录中; 在/tmp目录中查找大于50K,小于100K,后缀名为.php的文件,并全部拷贝到当前用户(shiyanlou)家目录下的phpdir目录中; 将系统中的/etc/fonts/conf.d目录中的所有文件(注意:不是/etc/fonts/conf.d目录)打包压缩为当前用户(shiyanlou)家目录下的fonts.tar.gz文件.
可以使用以下命令来一次性完成所有的要求:
```
sudo mkdir /tmp/test
sudo chown nbcc:shiyanlou /tmp/test
sudo chmod 750 /tmp/test
mkdir ~/phpdir
tar -xzvf ~/source.tar.gz -C /tmp/test --wildcards "*.c"
find /tmp -type f -name "*.php" -size +50k -size -100k -exec cp {} ~/phpdir \;
sudo tar -czvf ~/fonts.tar.gz /etc/fonts/conf.d/*
```
这个命令将会依次完成所有的要求:创建test目录并设置权限,解压source.tar.gz文件中后缀名为.c的文件到test目录中,将/tmp目录中大小在50K到100K之间、后缀名为.php的文件拷贝到phpdir目录中,将/etc/fonts/conf.d目录中的所有文件打包压缩为fonts.tar.gz文件。请注意,这个操作需要使用sudo权限。
Fontconfig error: Cannot load config file from C:\Users\AyangOVO\AppData\Roaming\MiKTeX\fontconfig\config\fonts.conf
Fontconfig is a library used to manage and configure fonts on Linux-based systems. However, the error message you provided suggests that you are encountering this error on a Windows system.
The error message indicates that Fontconfig cannot find the configuration file "fonts.conf" in the specified directory. This file is used to define the font configuration for applications that use Fontconfig.
To resolve this issue, you can try the following steps:
1. Check if the file "fonts.conf" exists in the specified directory: C:\Users\AyangOVO\AppData\Roaming\MiKTeX\fontconfig\config\. If the file does not exist, you might need to reinstall or reconfigure the software that uses Fontconfig.
2. If the file exists, ensure that the permissions are set correctly so that Fontconfig can access and read it.
3. If you recently installed or updated any font-related software, such as MiKTeX, try reinstalling or updating it. This might help fix any configuration issues.
4. If the issue persists, you can try resetting the font cache. To do this, open a command prompt as an administrator and run the following command:
```
fc-cache -f -v
```
This command will force Fontconfig to rebuild its font cache and might resolve any cache-related issues.
If none of these steps resolve the issue, you might need to seek further assistance from the software's support forums or the Fontconfig community.
阅读全文