Difference between revisions of "完美日用小工具"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
: unar -e GBK |
: unar -e GBK |
||
− | ; 显示所有进程,且只显示第12列 |
+ | ; 显示所有进程,且只显示第 12 列 |
: ps aux | awk '{print $11}' |
: ps aux | awk '{print $11}' |
||
Line 16: | Line 16: | ||
: scp sth.zip host:~ |
: scp sth.zip host:~ |
||
− | ; 给本目录下所有文件夹名字后加加一个g字符 |
+ | ; 给本目录下所有文件夹名字后加加一个 g 字符 |
<syntaxhighlight lang="bash" line> |
<syntaxhighlight lang="bash" line> |
||
#!/bin/bash |
#!/bin/bash |
Revision as of 21:49, 8 May 2024
- zip 文件解压后文件名乱码
- unar -e GBK
- 显示所有进程,且只显示第 12 列
- ps aux | awk '{print $11}'
- 让 apache2 中的 php 代码活起来
1Include etc/apache2/conf.d/*.conf
2# Add module for PHP 8
3LoadModule php_module libexec/apache2/libphp.so
4AddHandler php-script .php
- 复制东西进另一个地方
- scp sth.zip host:~
- 给本目录下所有文件夹名字后加加一个 g 字符
1#!/bin/bash
2for dir in */;
3do
4 if [ -d "$dir" ]; then
5 new_dir="${dir%*/}g"
6 mv "$dir" "$new_dir"
7 fi
8done