美文网首页
Shell命令集合

Shell命令集合

作者: 秀才不才 | 来源:发表于2018-09-18 09:11 被阅读13次
查看UUID
system_profiler SPUSBDataType | grep "Serial Number:.*" | sed s#".*Serial Number: "##
Mac虚拟地址修改
//查看所有网卡地址
networksetup -listallhardwareports
//修改 en1 网卡 输入 电脑密码 apple
echo 'apple' | sudo -S ifconfig en1 ether 00:00:00:00
//查看修改
ifconfig en1 | grep ether
显示隐藏系统文件 没错 AppleScript
//瞎写的 还能用
on run {input, parameters}
    display alert "显示或隐藏系统文件?" buttons {"取消", "显示", "隐藏"}
    set btnResult to button returned of result
    if btnResult is "显示" then
        tell application "Finder" to quit
        tell application "System Events" to do shell script "defaults write com.apple.finder AppleShowAllFiles -bool true"
        delay 1
        tell application "Finder" to launch
    else if btnResult is "隐藏" then
        tell application "Finder" to quit
        tell application "System Events" to do shell script "defaults write com.apple.finder AppleShowAllFiles -bool false"
        delay 1
        tell application "Finder" to launch
    end if
    return input
end run
允许位置来源
on run {input, parameters}
    set passwordStr to (item 1 of input)
    do shell script "echo " & passwordStr & " | sudo -S spctl --master-disable"
    return input
end run

相关文章

  • 嵌入式day12

    shell脚本的本质 shell脚本语言是解释型语言 shell脚本的本质:shell命令的有序集合 shell编...

  • 2019-05-08 shell第一天

    一. Shell介绍:命令的集合 用户,shell,内核关系:1.png 基本简介(1)#!指明解释器 与 ...

  • Shell编程、part4

    本节内容 1. shell函数 2. shell正则表达式 shell函数 shell中允许将一组命令集合或语句形...

  • Shell命令集合

    查看UUID Mac虚拟地址修改 显示隐藏系统文件 没错 AppleScript 允许位置来源

  • vim学习 09——shell命令

    vim学习 09——shell命令 执行 shell 命令 :!shell命令 : 可以执行 shell 命令。 ...

  • shell脚本(1)

    1、什么是shell脚本? shell脚本,包含若干个Linux命令集合;它是一个脚本,不能作为正式的编程语言。 ...

  • ADB常用命令集合

    基础命令 USB设备命令 文件传输命令 SHELL命令 adb shell pm命令 adb shell am命令...

  • (linux/mac)mysql调用系统命令

    system + shell命令! + shell命令

  • shell脚本基础

    shell介绍 shell命令: 在linux终端能被解析的命令,就是shell命令。 shell脚本: 多个sh...

  • adb shell logcat 命令

    adb shell logcat 命令 Tags: adb_shell adb shell logcat命令映射为...

网友评论

      本文标题:Shell命令集合

      本文链接:https://www.haomeiwen.com/subject/eulefxtx.html