草庐IT

shell-mode

全部标签

php - 如何更改 php 的 exec() 的 shell

我想在ubuntu服务器上使用php的exec()函数。问题是,我总是收到错误消息,即找不到命令。例如使用exec("echo123");打印sh:/echo:notfound对我来说,当我想使用bash时,php似乎正在使用shshell。我尝试在/etc/passwd中更改www-data的shell,但这也没有帮助。有没有人知道问题可能出在哪里,或者我如何为php的ubuntu用户更改shell。谢谢,蒂莫[编辑]也许这有帮助:我从ssh调用一个bash脚本作为timo,这个脚本调用一个php脚本,它使用exec。我知道,这听起来很奇怪,但它是更大开发环境的一部分......关键

android - 如何在 Android Shell 中获取以纳秒为单位的当前 Unix 时间?

我需要在Androidshell中获取以纳秒为单位的时间戳。使用date命令(来自busybox和Cyanogenmod)返回给我:@A001#date+%s.%N1819.N我发现的唯一其他有效选项是使用www.timeapi.org。curl-sSw'\n'http://www.timeapi.org/utc/now?\\s.\\N>>ctime_tar.txt但是,它需要连接并且需要0.1秒才能执行。我能用什么?我真的需要以纳秒为单位的时间,尤其是我可以作为单个命令执行的时间。 最佳答案 您可以尝试使用EPOCHREALTIM

android adb shell script - 如何拉取所有共享首选项

我需要在Debug模式下运行一个脚本,将所有共享首选项拉到一个文件夹中。根据我的研究,我只能从调试版本中提取。我尝试从非root手机获取这样的共享首选项:$adbshell$adbrun-asmypackagename然后我能够遍历到/data/data/mypackagename/shared_prefs但我希望能够将其放入脚本中。我只能从adbshell外部调用adbpull。我怎样才能在调试应用程序上从普通的非root设备中提取shared_prefs整个文件夹?一定有办法,因为facebooksetho是怎么做到的?这个问题是关于检索sharedPreferences而不是数据

android - 由于写入权限,无法使用 Android shell atrace 命令

如果我在emulator的adbshell中尝试atrace工具:#atraceatraceerroropening/sys/kernel/debug/tracing/options/overwrite:Nosuchfileordirectory(2)如果我这样做:#mount-tdebugfsnodev/sys/kernel/debug#mount:Nosuchfileordirectory如果我尝试创建文件夹:#mkdir-p/sys/kernel/debug#mkdirfailedfor/sys/kernel/debug/,Nosuchfileordirectory显然我没有写权

android - Java 编译器错误 : can't find (SINGLE_CHOICE_MODE);

这是我的代码fragment:importandroid.app.Activity;importandroid.app.Bundle;importandroid.app.ListActvity;importandroid.app.ListView;importandroid.app.AbsListView;importandroid.app.AdapterView;....publicclassMyDemoextendsListActivity{@OverridepublicvoidonCreate(Bundleicicle){ListViewmyLV=(ListView)findVi

android - 在 Android Studio Gradle 项目中运行 groovy shell

当我尝试在AndroidStudiogradle项目中启动Groovyshell时出现错误Exceptioninthread"main"java.lang.ClassNotFoundException:org.codehaus.groovy.tools.GroovyStarteratjava.net.URLClassLoader$1.run(URLClassLoader.java:202)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.net.URLClassLoader.findClass(URLCl

android - 权限拒绝 : not allowed to send broadcast android. intent.action.AIRPLANE_MODE

我正在尝试以编程方式打开飞行模式。Settings.System.putInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,1);IntentaeroPlaneIntent=newIntent(Intent.ACTION_AIRPLANE_MODE_CHANGED);aeroPlaneIntent.putExtra("state",true);context.sendBroadcast(aeroPlaneIntent);设置Global.AIRPLANE_MODE_ON失败,就好像我检查它返回0(OFF)的

android - 事件总线 : What are some differences among each thread modes?

根据EventBusdoc,EventBus用来传递线程的线程模式有4种:onEvent()PostThreadGoodforsimpletasksonEventMainThread()MainThreada.k.a.UIThreadGoodforUIchangesonEventBackgroundThread()BackgroundTreadUsingsinglethread,deliveringeventssequentially.Goodforexecutionrequiringmoderateamountoftime.onEventAsync()AsyncUsingsepara

android - 当我的 minSDKVersion 是 21 时发生构建错误 "Renderscript support mode is not currently supported with target 21+"

是project上的build.gradle依赖关系{classpath'com.android.tools.build:gradle:2.1.0-alpha1'.....}是app上的build.gradle安卓{compileSdkVersion23buildToolsVersion'23.0.2'defaultConfig{minSdkVersion21targetSdkVersion23.......//Renderscriptsupportmodeisnotcurrentlysupportedwithrenderscripttarget21+renderscriptTarge

jenkins持续集成通过shell脚本实现自动发布(三)

根据前面2篇文章目前我们的jenkins已经简单配置完成,通过这篇文章实现jenkins自动发布项目到测试环境。一、背景        在实际开发中,我们经常要一边开发一边测试,当然这里说的测试并不是程序员对自己代码的单元测试,而是同组程序员将代码提交后,由测试人员测试;或者前后端分离后,经常会修改接口,然后重新部署;     这些情况都会涉及到频繁的打包部署;    手动打包常规步骤    1.开发提交代码    2.问一下同组的小伙伴还有没有要提交的代码    3.拉取代码并在本地进行打包(war包或者jar包)    4.打包完成上传到测试服务器    5.查看当前程序是否在运行