What is the shortcut for removing the Windows boot screen logo during startup so that you can actually see all the command line commands that are running in the startup sequence?
Hi All,
Iam newbi to SUSE, I installed java in my SUSE linux Server edition, So i want to set the path in linux,So i created .bash_profile in in /root path using touch and added the path as "JAVA_PATH". When restart my linux the above command is not working and it show unknown command "JAVA_PATH", I can't able to boot in GUI mode, I can boot only in terminal mode, How to delete the file (.bash_profile in /root) ? And how to add java path in SUSE
Note: Before all the commands are working fine
Thanks in Advance,
Jak...
Suppose use can ssh to the server and can execure FTP and connect to other sources, download a virus and execute it.
Is it possible to force user to execute only some known commands?
I have a file named cmd that contains a list of unix commands as follows:
hostname
pwd
ls /tmp
cat /etc/hostname
ls -la
ps -ef | grep java
cat cmd
I have another script that executes the commands in cmd as:
IFS=$'\n'
clear
for cmds in `cat cmd`
do
if [ $cmds ] ; then
$cmds;
echo "****************************";
fi
done
The problem is that commands in cmd without spaces run fine, but those with spaces are not correctly interpreted by the script. Following is the output:
patrick-laptop
****************************
/home/patrick/bashFiles
****************************
./prog.sh: line 6: ls /tmp: No such file or directory
****************************
./prog.sh: line 6: cat /etc/hostname: No such file or directory
****************************
./prog.sh: line 6: ls -la: command not found
****************************
./prog.sh: line 6: ps -ef | grep java: command not found
****************************
./prog.sh: line 6: cat cmd: command not found
****************************
What am I missing here?
Hi there! I have a cron job running a PHP script every five minutes; the PHP script executes two bash commands at the end of the script. I know the script is running due to a log file it appends to. When I run the PHP script manually via the Ubuntu Gnome Terminal both bash commands execute flawlessly; however when the PHP script is triggered via cron, the two bash commands are not ran. Any ideas?
$command = 'notify-send "' . count($infoleakPosts) . ' New Posts."';
`$command`;
$command = 'firefox http://example.com';
`$command`;
*/1 * * * * php /home/andrew/grab.php USERNAME PASSWORD # JOB_ID_1
Executing Oracle RAC cluster management commands such as $ORA_CRS_HOME/bin/crs_start requires root permissions.
Using Solaris RBAC (Role-Based Access Control), one can give a non-root user permissions to execute those commands, but the commands still fail internally. Example:
$pfexec /opt/11.1.0/crs/bin/crs_stop SomeArg
CRS-0259: Owner of the resource does not belong to the group.
Is there a complete RBAC solution for Oracle RAC or does the executor need to be root?
EDIT: Note that my original /etc/security/exec_attr contained:
MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start:uid=0
MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start.bin:uid=0
As Martin suggests below, this needed to be changed to add gid=0 as:
MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start:uid=0;gid=0
MyProfile:suser:cmd:::/opt/11.1.0/crs/bin/crs_start.bin:uid=0;gid=0
Hi,
I am new to PL/SQL, I'm trying to execute the commands that I learned at the course.
VARIABLE area NUMBER
DECLARE
radius NUMBER(2) := &s_radius;
pi CONSTANT NUMBER := 3.14;
BEGIN
:area := pi * radius * radius;
END;
I understand that I can run this using SqlPlus, but I remember my teacher was running this from the web browser using Application Express. I try to run the same commands there, at HOME SQLSQL Commands, but I keep getting the error
"ORA-00900: invalid SQL statement"
.
Can you help me run it in Application Express or point me to a way where I can use an editor to run these course exercises?
Thanks!
Right now the program can be launched in a linux terminal. Once running you can type various commands and the program will do stuff on the machine until the user quits.
I would like to make the program into a service that the user runs and it goes to the background. Then the user should be able to make commands to it. Like start and stop, and write something to a log and whatever else my program does. Note that I need to send it arbitrary commands that my program will handle, not just start and stop. Maybe this means it is no longer a daemon - I dont know. How do I do this?
Also, if this is not too hard, I would like to be able to run multiple instances of this service. But it is not essential.
I have a java server application that, when its running, you can interact with it sending commands via stdin. I want to write a web interface that can send these commands to it.
In order to do that I need some way of getting commands from php to the stdin for this backgrounded job. Is there a way to do this from console? or possibly write some kind of wrapper that controls the server job and can access its stdin ? could this be done in python?
In tmux, i know we can chain multiple commands to a key by using \; See Here
But in vi mode, i want one single key press to go to the beginning of the current line, begin-selection, go to end-of-line, copy-selection.
In tmux.conf if i give the following
bind-key -t vi-copy 's' start-of-line \; begin-selection \; end-of-line \; copy-selection \;
It gives me this : 69: usage: bind-key [-cnr] [-t key-table] key command [arguments] error.
Or is there any alternative way to yank the current line in single key.
I've been digging deep into what actually comes with osX in /usr/bin and especially /usr/libexec.
Quite good stuff really, although the command syntax is a bit.. odd.
Let me direct the curious to the command that made me think of this:
networksetup -printcommands
I can not think of a command that better illustrates the need for good completion.
security -h
perhaps, but those commands have a familiar easy-to-read format.
I beseech the community, please point me to a place where I can find such a thing. I never type them right, and I ache for tab completion for this
Anyone have any idea where I could grab something? I'd prefer to stand on the shoulders of giants instead of trying to make a zsh/bash completion script leap into the world, ready for battle, like Athena, from my forehead.
I am no Zeus when it comes to compctl. Not at all.
When I attempt to execute any commands such as /etc/init.d/ssh restart or /etc/init.d/ssh start, I get no output. It just goes to the next command line (Ubuntu Hardy). I can even pass in junk parameters such as /etc/init.d/ssh asldkfjalskfdj and i get no warnings or error messages, it just goes to the next line. I can check in my processes:
lsof -i :22
and don't see my ssh process. I also don't see my SSH process when i run:
netstat -na --inet
Any troubleshooting suggestions?
Hi folks!
Let's say I have around 10 hg repositories cloned in a parent directory (let's call it "parent"). Is there any way I can invoke a mercurial command like hg status on all of the sub-directories rather than performing the laborious act of cding into each directory and then invoking hg status.
JFTR, I did try out the good old xargs but for some reason it fails to work. The commands which I used are:
find . -maxdepth 1 -type d -print | xargs -t "hg status"
and
ls | xargs -t "hg status"
Any help would be appreciated, TIA.
-Sasuke
As far as I am aware, there are 3 ways to check the computer boot time in windows. And they should give the same time, just in different formats. Why do I get different times, where do these commands get their time?
wmic os get lastBootUpTime | find "+120"
20140823002317.596695+120
systeminfo | find /i "boot time"
System Boot Time: 23.8.2014, 0:23:17
net statistics server | find /i "statistics since"
Statistics since 22.8.2014 18:21:30
The first two are the same (0:23), but the third is different (18:21), and also accurate. Why? At boot, all tree show the same, but at some point, they change.
I am using windows 7 ultimate, 64bit.
I am using screen (http://www.gnu.org/software/screen/manual/screen.html) to access my minecraft console. I created a server in /etc/init.d, and have minecraft running in the background.
Then, to access the minecraft console, I just type # screen -r in bash.
I can now do commands in the screen shell. The problem is if I do some command which exports a bunch of text, it exceeds the size of the screen and pushes the begging output off the page. And I cannot seem to scroll up and see it.
How can I scroll back and view all the output? How can I pause the output (maybe something like more or less)?
I have an Ubuntu 9.10 netbook. I has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account one this machine), all the commands in ~/bin stopped working. If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root(which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?
I have an Ubuntu 9.10 netbook. I has always run great. Two days ago, I was running as root for a while (~30), and when I moved back to my user account (only other account one this machine), all the commands in ~/bin stopped working. If I try ls, it comes up with "cannot execute binary file". Same with ln, mv, mkdir, clear, cp, etc. They all run as root(which makes sense, different files), but I have no idea why this happened. I don't want to stay as root to move around easily. Any idea?
In my .vimrc, I defined this line:
map ,ps <Esc>:!ps<Space>-a<CR>
The mapping is set (which I controlled via :verbose map ,ps while inside vim). There is nothing else mapped to the comma.
However, if I type the command in command mode, nothing is displayed in the status bar, the comma is ignored, the p movement and the s insert are triggered. (I.e., VIM reacts, as if there was no command ,ps.)
Is there any magic that I have overlooked in enabling comma-started mapped commands?
Hi,
Iam using vmware player version 3.1 to boot a minix 3 os image. After booting the minix os I want to get some files from a server using ftp. the ftp connection to the server works but when i use the commands "ls" or "get" nothing happens except it says "200 PORT command successful" and it hanges in there. The only thing i can do after typing ls+enter or get+enter is to exit the ftp by using ctrl+c.
If anyone knows a solution to this? please help.
Thank you
Let's say I have a command called foo which prints a number to the screen when called:
$foo
3
Let's also say I have another command called bar which prints another number to the screen when called:
$bar
5
I'm looking to write a shell script which will add together the output of foo and bar. How would I do that? (The outputs from the commands are not known ahead of time. They just so happen to have been 3 and 5 the last time they were run. They could have been something else.) Thanks!
I am trying to load the .arx file for a particular program, once the User clicks on the customized tab in AUtoCAD.
Requirements are:
1.When User Clicks on the customized tab, it loads the .arx
2.Runs the program
3.Unload the .arx file. I achieved Point 2 by acedRegCmds-();
I tried getting point 1 and 3 working, by using
acedArxLoad(_T("C:\Example\Example.arx")); command, but it did not
work.
Any help with the same would be highly appreciated
Also just curious, should loading multiple commands in LISP work for this?
From what I can tell from reading other questions/answers is that my .bash_profile file may be corrupt. If I type
echo $PATH
in terminal the result is:
/usr/local/git/bin
From what I've read, that's not what the result is supposed to be. But I also can't get any of the commands (like edit or subl, for Sublime Text 2) to open the .bash_profile file to edit it. I was able to open the file in TextEdit using "cmd-shift-.", and here's what's in the file:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
PATH=$PATH:~/bin
export PATH
export PATH=/usr/local/git/bin
But the file is LOCKED, so I can't edit it there either. I'm very new to programming and in the middle of trying to install everything on my Mac to go through a Ruby on Rails tutorial. I can't even check my version of ruby, since even
ruby -v
returns
-bash: ruby: command not found
Any help would be greatly appreciated. Thanks.
I need to allow users to run a limited set of commands.
But not to allow them to create interactive sessions.
Just like GitHub does.
If you try to ssh without a command it greetings you and close the session.
I can acquire this by using ForceCommand some-script
But getting in some-script i then need to eval user's input.
Perhaps any other NoTTY-like option in sshd_config?
--- UPDATE ---
i'm looking for a pure SSH / Bash solution, not Perl/Python/etc. hacks.