Difference between revisions of "完美日用小工具"

From 清冽之泉
Jump to navigation Jump to search
Line 1: Line 1:
  +
{| class="wikitable"
; zip 文件解压后文件名乱码
 
  +
! 用途 !! 方法
: unar -e GBK
 
  +
|-
 
 
| zip 文件解压后文件名乱码
; 显示所有进程,且只显示第12列
 
 
| unar -e GBK
: ps aux | awk '{print $11}'
 
  +
|-
 
 
| 显示所有进程,且只显示第12列
; 让 apache2 中的 php 代码活起来
 
 
| ps aux | awk '{print $11}'
  +
|-
 
| 让 apache2 中的 php 代码活起来
  +
|
 
<syntaxhighlight lang="bash" line>
 
<syntaxhighlight lang="bash" line>
 
Include etc/apache2/conf.d/*.conf
 
Include etc/apache2/conf.d/*.conf
Line 12: Line 16:
 
AddHandler php-script .php
 
AddHandler php-script .php
 
</syntaxhighlight>
 
</syntaxhighlight>
  +
|-
 
; 复制东西进另一个地方
+
| 复制东西进另一个地方
: 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:08, 8 May 2024

用途 方法
zip 文件解压后文件名乱码 unar -e GBK
显示所有进程,且只显示第12列 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