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


ADVERTISEMENT

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 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 :: Scp Command And Internaltion Characters

Feb 20, 2010

When I upload a file usind the scp that contains the German characters these characters get changed to . For example, a sentence in an html file like this

looks like this

Why are this characters getting changed?

View 6 Replies View Related

General :: Ps Command Is Visible In 80 Characters?

Sep 1, 2010

When i am running ps -ef command I am getting the execution of the commnad in "80characters"

View 5 Replies View Related

General :: Sed Error - Extra Characters After Command

Aug 3, 2011

sed '/
$/ {N s/
//}'
sed: -e expression #1, char 10: extra characters after command

I want to understand what is wrong with my command line. When I can do the some of following in a script but not in a command line. I have been working through the tutorial at [URL]. When I got stuck at the section Working with Multiple Lines. These script works fine.

#!/bin/sh
sed '
# look for a "#" at the end of the line
/#$/ {
# Found one - now read in the next line
N
# delete the "#" and the new line character,
s/#
//
}' file

In my case I am looking for or return ^M.
#!/bin/sh
sed '
# look for a "#" at the end of the line
/
$/ {
# Found one - now read in the next line
N
# delete the "#" and the new line character,
s/
//
}' file

The problem is when I try to convert it to a single line shell command it gives me an errors.
sed '/
$/ {N s/
//}'
sed: -e expression #1, char 10: extra characters after command
sed '/
$/{N s/
//}'
sed: -e expression #1, char 9: extra characters after command
sed '/
$/{Ns/
//}'
sed: -e expression #1, char 8: extra characters after command

I want to understand what is wrong with my command line. When I can do the following in a script but not in a command line. I have created a sed script to do the work I want.
cat test.sed
#!/bin/sed -f
/
$/ {
N
s/
//
}

View 1 Replies View Related

General :: Escape Characters In Watch Command

Oct 20, 2009

Need little advice running this command.
watch -d 'ps aux | awk '{print $4" "$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head'

I get this error message from AWK. awk: cmd. line:1:
{print awk: cmd. line:1: ^ unexpected newline or end of string

I have tried all the usual by trying to escape the single and double quotes in the command but same result. The end result should be the a listing of memory hungry processes that are scanned every 2 seconds (watch default value).

View 2 Replies View Related

General :: Command To Count All Characters In File

Mar 26, 2010

Anybody know and command to count any characters in file? I would like to know the total number of character " (quote) in file. My idea is to check if in a script the total number of this character is pair.

View 4 Replies View Related

General :: How To Strip/trim Characters In Command Line

Mar 23, 2011

I have a bunch of files (around 900) that have some special characters. Some of the files contains example, and quoting "[useless] filename (something)"so what I want is just to strip the brackets and parenthesis, some are folders, others are text files

View 1 Replies View Related

General :: Playing With Various Characters In The Command- Line Interface?

Apr 23, 2010

I am playing with various characters in the command- line interface trying to learn what they mean and when i should use them.

View 7 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

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

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

General :: Bash : Pass Command Line Arguments Containing Special Characters?

Jul 14, 2010

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program(there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]".Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.?

(Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 7 Replies View Related

General :: Bash: How To Pass Command Line Arguments Containing Special Characters

Jun 24, 2011

I've written myself a linux program "program" that does something with a regular expression. I want to call the program in the bash shell and pass that regular expression as a command line argument to the program (there are also other command line arguments). A typical regular expression looks like "[abc]_[x|y]". Unfortunately the characters [, ], and | are special characters in bash. Thus, calling "program [abc]_[x|y] anotheragument" doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.? (Calling program "[abc]_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)

View 8 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 :: Finding IP Address Using Command Prompt?

Apr 4, 2010

I'm looking for a way to get my IP address using the command prompt in Linux. I know when you type "ifconfig" you can get your local IP address (i.e. 192.168.0.103), but I'm looking for my IP address that I get from my ISP. How can I get this from Linux without having to visit some website?

View 3 Replies View Related

General :: Finding Mac Address With Tcpdump Command?

Dec 10, 2009

when i send any packet to anu destination and want to see he mac address of source and destination i am using the command tcpdump -qec1 but rather then getting the mac address of source and destination each time i am getting mac address of the system which is broadcasting. will anybody tell me how can i get source and destination mac address even if any other packet is also being broadcast to my network.

View 1 Replies View Related

General :: Finding Folder Size Using Command

Oct 26, 2009

I want to know is there a command to find size of a folder.

View 4 Replies View Related

General :: Finding A Command Line Html Reader?

Dec 17, 2010

Kernel 2.6.21.5, Slackware 12.0 A command line html reader, or a conversion tool from html to text is what I would like to know if any of you guys knows. It has not to do a perfect job. And it would be nice if it is a native unix/linux program.

View 5 Replies View Related

General :: Command For Finding Specific File Types?

Oct 15, 2009

If there is a command I can use to find specific file types? Say if I want to find all the jpg's in my home folder, but they don't have the .jpg extension in the name, how would I do it? Or can I set some kind of size parameter to find them? The ones I want are all from my digicam and roughly the same size.

View 7 Replies View Related

General :: Finding A Ubuntu Server 11 Command List

Jun 20, 2011

Would like a command line list of commands, that I can print out, I know this would be allot of pages. I have tons of books and the net, but its a royal pain searching for the right command, need something I can flip through.

View 5 Replies View Related

General :: Finding A Command For Going Back A Number Of Steps In A Directory Without Using Cd?

May 10, 2011

I'm constantly going 'cd ../../../../'. Is there a command/alias that could let me go 'cmd 4' and I'd be taken back 4 directories?

View 8 Replies View Related

General :: Command For Finding File / Directory From Current Path

Apr 30, 2010

I am total new to linux as I worked mostly on RTOS (symbian). My problem is, I need to find the file IOSTREAM.H and I am following commands below:
1) cd /
2) find . iostream.h ( finds the file / directory from the current path)
It shows No such File or Directory

View 7 Replies View Related

General :: Finding The Command Line To Launch An Application From A Terminal?

Sep 25, 2009

Is there a way to find out the currently installed packages and the corresponding command line to launch the package from a terminal. For example, I know that I have openoffice installed but I do not know how to find the command line to launch it.

View 5 Replies View Related

General :: Command VM Install - Finding Exact Location Of File

Oct 30, 2009

I am using linux machine and execute a command vm-install to perform some operation. How would I find the exact location of this file.

View 1 Replies View Related







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