Skip to content

cmdlinux 部分命令在沙箱环境不可用导致文件管理失效 #363

@1ucky7

Description

@1ucky7

在容器/最小化系统里常见的是 BusyBox 的 find ,不支持 GNU 的 -printf ;或者部分工具的选项与 Debian/Ubuntu 的 coreutils 不一致。

现在的命令:
cmd=export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;TAGS="e18""f69";TAGE="17fb9""bdcd64";asenc(){ cat "$@"; };asexec() { cd /app/ && find . -maxdepth 1 ( -type d -printf "%f/\t%AY-%Am-%Ad %AH:%AM:%AS\t%s %.4m\n" ) , ( -not -type d -printf "%f\t%AY-%Am-%Ad %AH:%AM:%AS\t%s\t%.4m\n" )||echo -n "ERROR:// Path not found OR no Permission"; };echo -n "$TAGS";asexec|asenc;echo -n "$TAGE";

沙箱环境可执行的命令:
cmd=export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;TAGS="e18""f69";TAGE="17fb9""bdcd64";asenc(){ cat "$@"; };asexec() { cd /app/ && ls -la 2>/dev/null || echo -n "ERROR:// Path not found OR no Permission"; };echo -n "$TAGS";asexec|asenc;echo -n "$TAGE";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions