ChinaUnix.net
相关文章推荐:

unix 切换shell

如果你的目录层次很深的话,这个shell会很方便的直接切换到目的目录,例如 当前目录/usr/home,而目录desdir在/usr/home/app/local/opp/william/desdir 直接打入 $ cd desdir,便可直接从当前目录/use/home切换到/usr/home/app/local/opp/william/desdir 配置一下.profile,加入两行 . ./bin/chdir alias cd='chdir' file:chdir ##################################################### # auto find your directory # Writer: wil...

by myq12 - 其他UNIX - 2007-11-13 11:48:39 阅读(3680) 回复(7)

相关讨论

现在我在系统里面一直直用A用户登入的,但是在工作中却经常需要切换到B用户,有时又要切回来,所以我想问问有没有比较好的办法,通过一个脚本就可以切到B用户,而不用老是 su - B passwd:**** 这样确实麻烦?请教一下看看有没有大侠会!

by yakyren - Shell - 2005-09-16 10:48:34 阅读(2010) 回复(3)

传统的切换分屏的方法是ALT+F1、F2……F12等,但是我现在想通过shell命令在程序中实现可以吗?怎样实现?? 比如说,现处于主控台tty02即第2屏,想通过命令而不是用ALT+F2来切换到tty01即第1屏,请问各位高手怎么实现?? 先谢谢了!

by legendfan - 其他UNIX - 2004-08-30 01:27:37 阅读(905) 回复(1)

本帖最后由 yfjelley 于 2012-10-08 12:39 编辑 dst_path=`cd $home_path/e771/ && pwd` local_path=$PWD 怎样修改能让local_path与dst_path 是始终是相等的呢? 我当前目录要在e771下?

by yfjelley - 监控及自动化运维技术 - 2012-10-15 18:45:31 阅读(1803) 回复(2)

从bash切换到tcsh时 出现如下错误:if: Badly formed number 哪位大虾指点一下如何解决????? 谢谢!

by hpwu - Shell - 2010-06-02 21:52:42 阅读(856) 回复(1)

which sh /usr/bin/sh echo $shell /bin/ksh . ./usr/bin/sh ./usr/bin/sh: not found 好像不行。。。。。。

by bigacer - Shell - 2010-04-28 19:36:10 阅读(5695) 回复(3)

root用户输入tcsh提示 if:Badly formed number csh也一样 bash、sh正常! 服务器环境,10台刀片服务器安装MPI、openpbs。本机为head节点 怎么解决?谢谢! #chsh -l /bin/sh /bin/bash /sbin/nologin /bin/ash /bin/bsh /bin/ksh /usr/bin/ksh /usr/bin/pdksh /bin/tcsh /bin/csh /bin/zsh 在线等!!!

by wingtip - 集群和高可用 - 2008-11-11 11:06:17 阅读(1279) 回复(0)

我有一个命令要在非ksh下执行是一种特殊的shell,这个shell不能执行类似awk sed sort之类的基本命令总之比较傻,所以我也不能在这个shell下写脚本,只能#/bin/ksh,但是ksh下我又不能执行开始我提出的那个命令,有办法解决吗? 比如 unknowshell -->command1 unknowshell ~ -->ksh $ command1 $ksh: command1: not found 理论上我能实现在ksh下写脚本实现运行command1命令马?

by frankytf - Shell - 2007-12-14 17:12:24 阅读(1410) 回复(2)

这是我写的一个测试脚本,希望大家探讨双机切换技术 环境: Sco unix 5.X 网卡:net0, net1, 局域网中有一个相同的服务器作双机技术。 脚本配置文件内容: # Used for swapip configure # Localservice=Local Service ip localservice=net0,192.168.0.222,255.255.255.0 localstandby=net1,192.168.88.8,255.255.255.0 remoteservice=net1,192.168.0.73,255.255.255.0 localgateway=192.168.0.1 remotegateway=192.168.0.1 脚...

by spender - Shell - 2004-08-10 20:35:49 阅读(1519) 回复(1)

我在root中执行一个脚本,但是其中的一些命令或脚本必须用oracle用户来执行。 #!/bin/sh 。。。。 #----------oracle用户执行 su - oracle /bin/cd /xxxx/xxx /bin/rm -rf * #----------下面的命令需要用root来执行 。。。。。。 现在的现象是执行到su - oracle后,shell变为: oracle@localhost$ 然后脚本不再继续执行,需要手动属于exit才能继续,但是在脚本中加入exit也不好使 请问各位我应该添加点什么? 注:我...

by cjavavb - Linux系统管理 - 2011-04-20 10:50:07 阅读(17054) 回复(5)

root用户输入tcsh提示 if:Badly formed number csh也一样 bash、sh正常! 服务器环境,刀片服务器安装MPI 怎么解决?谢谢! #chsh -l /bin/sh /bin/bash /sbin/nologin /bin/ash /bin/bsh /bin/ksh /usr/bin/ksh /usr/bin/pdksh /bin/tcsh /bin/csh /bin/zsh 在线等!!!

by wingtip - 服务器应用 - 2008-11-11 15:16:17 阅读(1242) 回复(1)