General :: Writing Command Executed Into Logfile?

Jun 7, 2011

Currently we are using Unix machine & the activity are logged in the file using following code used in profile

.profile code

# /ln/aud_root/dds_ibm/.profile
trap 'print "not allowed"' INT
trap 'print "not allowed"' QUIT
trap 'print "not allowed"' TSTP

[Code].....

View 2 Replies


ADVERTISEMENT

General :: Set Up New Keybinding For Finding Last Command Executed Using The First Few Characters Of The Command In Csh?

Jul 21, 2010

I want to be able to use Ctrl+R to have reverse-i search. Also if I press Shift+Up Arrow after typing the first few characters of a recently executed command then the shell should complete the command by finding the most recent commmand having the same first few characters.

View 1 Replies View Related

General :: History With Date And Executed File/command?

Feb 17, 2011

what is the tool to get the history inclduing the user name,command time and from which file/folder the command is executed.

View 1 Replies View Related

General :: Variable Storing The Previously Executed Command?

May 23, 2010

I want to use PROMPT_COMMAND variable to build a history of all the commands i execute. So Basically i want to append the last executed command to my own command log file. How can i find the last executed command ?

I want to add PROMPT_COMMAND="echo $last_executed_command >> my_command_log" But I am not sure how to find the last executed command

View 2 Replies View Related

General :: Pass Option To LILO In Order To Have Script / Command Executed At / After Boot

Aug 28, 2009

I have one distro installed, LILO as the boot loader, and i wonder if it's possible to duplicate the lilo entries with an option which executes some script or command during, or after the boot.Actually, i installed a Slackware + autolaunching virtual machine, but i have two VM, so i need to autolaunch one of them. May i choose it from the very beginning ?

View 9 Replies View Related

General :: "ps" Command Not Executed In Script When Using Crontab

Jun 4, 2011

I wrote a simple script to see if firefox is running. However, the ps command is not executed, when I open the logfile I see: "DEBUG LINE 4" and not DEBUG LINE 5, so "ps -e" is never executed despite using the full path of the ps command.

Here is my script:

#!/bin/bash -l
# simple script to test if firefox is running...
PS=/usr/bin/ps echo "DEBUG $LINENO"
$PS -e | fgrep firefox echo "DEBUG LINE $LINENO"

View 6 Replies View Related

General :: Writing A Command (for Loop) That Would Ping A Class C Subnet?

Nov 4, 2010

how to write a command (for loop) that would ping a Class C subnet to make it so that it only replies once and does not show the statistics?

View 2 Replies View Related

Ubuntu :: SSH Not Releasing Terminal After Command Is Executed?

Sep 7, 2010

When I run the following command from my macbook to my ubuntu server the terminal does not get released. It just sits there until I Control-C the command.

Code:
ssh user@my-server 'sudo /etc/init.d/nginx start'

When i login and then run the command everything works fine.

Code:
ssh user@my-server
sudo /etc/init.d/nginx start

[Code]....

View 1 Replies View Related

Software :: Read Command Not Executed In Script

Nov 2, 2010

I have a read command in the following script, but it does not get executed when I run the script. What's wrong with the read statement?

View 3 Replies View Related

Security :: Permissions For Chown - Command Executed By Root Only

Feb 22, 2010

Inspite of having 755 permissions on the chown command, it seems the command can be executed by the root only. I was under the impression that the 'x' permission for 'others' can give executable rights to the normal user too, which does not seem to be the case here. Just curious to know, if not the file perms itself, what controls the execution of the command?

View 6 Replies View Related

Software :: At Command Fails \ Intention Is To Get Itself Executed Every Minute?

Mar 31, 2011

Here is my script for at command. The intention is to get itself executed every minute.

Code:
logfile=/tmp/attest.log
loginterval=1

[code]....

View 4 Replies View Related

Programming :: Effect Of Using Eval To Execute A Command As Opposed To Writing It On The Command-line?

Jun 18, 2010

Code: cmd='date | wc'

$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?

View 4 Replies View Related

Ubuntu Installation :: Commands Are Not Working In Terminal / Command Is Not Executed?

Jul 19, 2010

I am working on Ubuntu 9.10.Since last two days there is issue while working with Terminal.Whenever I type a command and press enter it doesnt do anything. command is not executed. I guess its in loop. when I press Ctrl+C then it comes out of loop. this happens with all commands and I am not sure what is the problem.I have reinstalled Terminal but it did not worked.

View 8 Replies View Related

General :: Commands For Logfile Handling?

Mar 28, 2011

I've got this log file and I need to get all sorts of information from it...

24 - [02/Sep/2010:00:01:16 +0200] - 10.1.53.62 - 200
23 - [02/Sep/2010:00:01:26 +0200] - 10.1.53.62 - 200
19 - [02/Sep/2010:00:01:56 +0200] - 10.1.53.62 - 200

[code]....

View 6 Replies View Related

General :: Check The O/p Of Xterm Logfile?

Oct 25, 2010

i am trying to run xterm command in linux.it opens one pop-up window and closes when we close that terminal.I want to store it like a file.

$ xterm -l -lf "test"

but test is not storing any where? how to configure this?

View 2 Replies View Related

General :: Split Logfile For Error Logs?

Dec 30, 2009

Is there a tool already out there that will split error logs based on the virtual host they belong to? Or perhaps a somewhat simple way to write a script that can do this? I'll keep looking for a solution but I thought I'd ask in case someone here has one to offer.

View 2 Replies View Related

General :: Writing With "W" In Top Is Not An Option As Top Command

Sep 2, 2010

I have the "top" command and I want to override its default behavior for every user, even for future users.

Writing with "W" in top is not an option as my top command somehow overrides the custom behavior per user and always turns to default behavior.

So, what I am asking for is, are there command line switches that override default behavior of top, for example:

Code:
top -<BLABLA>

to show me the load average per core which would be equivalent to starting top first and then pushing the key "1" on the keyboard.

Remember, writing to toprc is not an option for me as top for some reason ignores its config and just goes for default behavior.

Edit: it seems to me this is a bug in the procps package. That is why I updated it to the latest version for my distro CentOS 5.5 and procps to the following [URL] HOWEVER, it doesn't work even now.

View 8 Replies View Related

Hardware :: 'dd' Command Writing To Usb Pen Drive At Only 2.5mb/s?

May 12, 2011

I was just wondering is 2.5mb a second normal to write to a usb2 pendrive with the 'dd' command?

I know dd maybe having an influence on writing time, but it still seems really low for usb2 transfer?

Is there a command to measure the time a file takes to transfer from HD to usb pen? (not using dd).

View 11 Replies View Related

Software :: Writing 0xFF With The Dd Command?

Nov 19, 2010

I'm trying to write a 100MB file for example all with 0xFF so in the hex editor it should look like "FF FF FF FF FF FF" etc. I know you can write a 0x00 with this line:

Code:
dd if=/dev/zero of=myfile bs=1M count=100
But how to do 0xFF or another character?

I want to use the 'dd' command because with the 'bs=1M' argument it is 100 times faster than any other shell command I've seen.

View 1 Replies View Related

Programming :: Java AT Command Writing Errors?

Nov 11, 2010

I am running a java application on centos. For now I have a gsm modem connected via the the usb cable. Below is the message I get when I type the command dmesg | grep tty

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
usb 2-2: pl2303 converter now attached to ttyUSB0

[code]....

View 9 Replies View Related

General :: When Was Script Last Executed?

Jan 18, 2011

I have a script scheduled to run with Crontab at 5am each weekday.The script is all good and executes manually (is just a simple stop/start of a service)I have reason to believe that it is not executing according to schedule.I am looking to see when a script was last executed.The script is executing accordingly (long story short, I forgot it was Tuesday). I would still like to know how to check a last-execution time.

View 1 Replies View Related

General :: Which Script Gets Executed?

Jun 16, 2010

How can I find out which script runs and automatically mounts any usb drive inserted? This script seems to be faulty because it fails on ext3 disks but functions fine on NTFS or HFS+ disks. If I can find out which script it is maybe someone can help me fix it?

View 14 Replies View Related

General :: Script Is Not Being Executed During Shutdown?

Feb 5, 2011

why a script is not being executed during shutdown. I have a script in 'init.d' that works properly from command line. It also works fine at boot. My problem is that it does not execute at all on shutdown. I am using all the standard rc.d stuff for the script. Here are my LSB tags:

Code:

### BEGIN INIT INFO
# Provides: setwebpage
# Required-Start: $network httpd

[code]....

When I check the rc?.d directories, the appropriate links are there with the proper NN. This script has to FTP a couple of files to a remote server so the network is required and the script should be run very early in the shutdown process. However, the first thing the script does is send a message via 'logger' indicating it is executing with the 'start' or 'stop' parameter. The 'stop' message never shows up in the log thus I have to conclude that it simply is never executed.

View 8 Replies View Related

General :: .wav File Executed By Script

Dec 28, 2010

I have a .wav file that ask "what's is your name in a robotic/computer voice. Is there I way I can execute that .wav file to execute as the script itself ask "What is your name?" giving the illusion that the computer is asking the question?

View 7 Replies View Related

General :: C Code Compiles But Is Not Executed In Kubuntu?

Apr 14, 2010

I'm running kubuntu 9.10 in VirtualBox, i wrote the simplest "hello world" program in C, the code compiles, i ran it through a debugger and it seems to run fine. the only problem is nothing gets actually printed to the console.

heres the code:

#include <stdlib.h>
#include <stdio.h>
int main (int argc, char **argv) {
printf("hello world");

[Code].....

View 2 Replies View Related

General :: History Of Commands Executed By Users

Apr 16, 2010

i am working with linux security auditing project on my Servers.I want to find out all the commands executed by individual users.i think using last command,find out the login details.But how can find out the commands executed by each users on all logins except "history".?

View 2 Replies View Related

General :: Script To Know Whether Croned Or Manuall Executed

May 20, 2011

How to find whether the script executed manually or executed from cron job?I tried $SHELL but this don't work

View 5 Replies View Related

Server :: When Executed Last Command Its Showing System Ip Logged In Time And Logged Out Time The Output?

Feb 27, 2011

logging in a server through putty in the same network when i executed last command its showing system ip logged in time and logged out time the output as followsthis is my system
oot pts1 xx.xx.xx day month date time in time out timeand similarly am geeting other than this likeroot :0day month date time still logged in this is from more than 3 days its logged in

View 2 Replies View Related

General :: Edit History To Remove Few Commands Executed?

Jun 30, 2010

Suppose when I issue history command it is showing 100 entries with number attached to each command executed.

how to edit the history to remove few commands executed by me so as to protect the system from other users.

View 11 Replies View Related

General :: Check Weather A For Loop Has Executed Properly ?

Jul 13, 2010

I want to check weather a for loop has executed properly

Code:
for name in `awk -F: '{printf " "$1}' /etc/passwd`;do
echo $name;done
[ $? -eq 0 ] && echo "SUCCESS" || echo "Failed_to_fetch_the_user";

Every time this gives output as SUCESS even If I change /etc/passwd to other file name.

How can I resolve this ?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved