General :: Use Command To Open First Search Result With Vi?

Nov 10, 2010

Every time I need to find a file and then open it, I have to use :
find ./ -name **.properties. , then copy the result, and then vi "paste the result here" .
If I need to use a mouse, it can be a little trouble. So is there any better way to do this?

View 6 Replies


ADVERTISEMENT

General :: How To Know If The Command Find Any Result

Oct 21, 2010

#!/bin/shLOOK_FOR="NTLMAuthenticationFilter"for i in `find ./ -name "*jar"`doecho "Looking in $i ..."grepjar -e $LOOK_FOR $idoneI wrote the script above, and try to find if there any file name LOOK_FOR exist in those jar,my quest is: grepjar -e $LOOK_FOR $ihere how can I check if there are any successful result , and output them ?

View 2 Replies View Related

General :: Store Result Of Wc -l Command In Variable?

Apr 19, 2011

I want to store the result of wc -l as a variable so I can use it later in my script...so far unsuccessfully.

I have tried this:

set `echo awk '{ print $1, $6}' | wc -l` | echo $1

but it is far from working.

View 11 Replies View Related

Ubuntu Multimedia :: Songbird Search Takes Ages To Give Result

Jan 6, 2010

I really am a great fan of Songbird, but there's one thing that keeps annoying me: searching my music collection. I have about 12k songs (67GB) in my library, and using the search bar is pretty much a disaster: whatever I type it takes ages to come up with something, and if I delete any of the written to enter something new it hangs for like five minutes. This sort of forced me to look for specific songs myself or just keep it going on shuffle, none of which is a good solution.
I believe the problem is that songbird searches after every single typed character instead of waiting until I'm finished, which is a cool feature with smaller amounts of data to look through, but in my case it's just annoying and pointless. How to disable this feature? I am using Songbird 1.2.0, Build 1146.

View 6 Replies View Related

General :: BASH Script Will Not Get Use Result Of Command When Run As Cron Job?

Jul 1, 2011

I am frustrated by running a script on the Fedora 14 computer as a cron job. I paste the code:

Code:

#!/bin/bash
#a backup script to copy data from sda to sdc
ROOTVOL=`blkid -U ea210a08-6212-4dc8-be1c-23fce3b965bc`

[code]....

So when I run this as root, for example:

Code:

# /root/myscript

the result is what I expect:

Code:

Jul 1 13:41:16 svn root: ADMIN: Executing backup-svn
Jul 1 13:41:16 svn root: using blkid ea210a08-6212-4dc8-be1c-23fce3b965bc as /dev/mapper/vg_svn_backup-lv_root

[code]....

View 3 Replies View Related

General :: Execute Command Inside First Directory Of Each Matched Result?

Aug 8, 2011

I am working at a client who has a project where code is a mixture of different source control systems. So a layout might be like this

project/a/.svn
/a/subfolder/.svn
/b/.hg
/c/subproject/.svn
/d/.hg

So I am trying to put together a simple command that when executed from the project folder will run the appropriate hg/svn command in each project i.e:

[Code]...

Since the client has many such projects, Instead I am looking for a solution similar to find -exec where the svn/hg commands are automatically executed on each first level of match (i.e. svn up is run in the project/a folder but not in project/a/subfolder). How can such a command be constructed ?.

View 1 Replies View Related

General :: Sudo And Command Line - Get The Result Without Having To Supply A Password

Mar 31, 2011

I have the following commande /sbin/fuser -f -u /u/DT01/F010107 1>/tmp/null 2>/tmp/seausr.T0069 when executing as root 'su' this give me all user using the file. but when tried with 'sudo' i am asked with 'user password'. Is ther anyway to simply get the result without having to supply a password and to see all user not only me. (i have the file open also).

View 1 Replies View Related

General :: Result Of Type Command Is Hashed And Shows Another Path In Brackets?

May 30, 2011

I came across this reult of the type command (hashed) in another post. (see below).

Code:

fraespappp8:/data/apps > type topic_file_publish.sh
topic_file_publish.sh is hashed (/data/apps/pnbgstk/publication/topic_file_publish.sh)
This (result = hashed) is new to me.

I wonder which kernel/distro/shell it is from.

View 1 Replies View Related

Fedora Security :: Open The Programe But No Result Come Out

Jun 22, 2009

I have installed the rkhunter , but it does not work i kept on trying to open the programe but no result come out

View 2 Replies View Related

General :: Command Line Search Tool

Apr 10, 2011

This is a bit of a long shot and I think the answer will be no but I thought I'd ask just in case. I have a number of tutorials in html but I want to be able to search for particular information in these files and display that information in the terminal rather than having to go through a browser. Apart from using grep which gives a pretty messy display or having to write a a specially Bash or python script, is there any command line tools that can provide such a function?

View 4 Replies View Related

General :: Case Insensitive Search From Find Command?

Apr 29, 2011

I am not able to figure out how can I do case-insensitive search using the find command.

I tried

find . -name -i pattern

And it does not work.

View 2 Replies View Related

General :: Find Command \ Search File Excluding The NFS?

Jan 20, 2010

I want to search file excluding the NFS ...find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions alsoIs there any way to exclude the NFS only.

View 2 Replies View Related

General :: Find Command To Search Wildcard In Path?

Dec 8, 2009

I need a command to search for any file in a directory like so:

/home/*/upload/* and then change permissions any file in that directory.

Find doesn't seem to match what I need.

View 12 Replies View Related

General :: Search Word In Group Of Files Using Command?

Oct 10, 2009

i am using openSUSE 10.3 & like to use power of terminal to do tasks.I want to search all files containing word 'echo' in given folder.What should be command.

View 14 Replies View Related

General :: Using Find Command To Search For All Pictures, Or All Music?

May 17, 2010

Trying to find a way to have the find command perform a search using multiple file extensions such as "find all pics" i.e. .jpg, .png, .gif, .raw etc. I would have thought something like the following would have worked, but apparently I'm doing something wrong:

sudo find / -type f -iname "*.jpg" "*.png" "*.gif" -printf

I'm guessing find simply doesn't support more than one "-name/-iname" at a time? Or perhaps I'm going about this the wrong way? I realize most times there's several different ways to skin a cat when a task is requested in linux/unix.

View 5 Replies View Related

General :: Unix - 'man' Command: Search For A Word/phrase And Cycle Through?

Jun 29, 2011

When looking for a certain word or phrase in the man page of linux command, one can type '/' followed by the word/phrase to search for it. What I'd like to be able to do is to search for the next occurrence of the word/phrase without having to type it out again. Kinda like when you use 'ctrl+f' in a browser to search for a word, and then press 'enter' to find the next occurrence of that word.If this is possible to do, how do I do it?

View 2 Replies View Related

Programming :: Pass An Expect Command Result Into A Variable And Then Use It Again?

May 4, 2010

I'm trying to create a program that would locate the oldest file of a certain type on a server. Here's the commands:

OLDEST_PATH=`find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1`
OLDEST_FILE=`find -L $OLDEST_PATH | grep .mp3 | sort -f | head -1`
ls -al $OLDEST_FILE

I'm writing this all in expect but I'm having problems. The main problem I have is whenever I try to run the first command, I can't seem to isolate the result of the OLDEST_PATH so that the 2nd command will work. There always seems to be a newline in the variable and the result is only "find -L" command running and it bypasses the variable. If I can just figure out how to get the 1st and 2nd command to work, then I can figure out the 3rd. Here's some code:

Code:
send "find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1
"
sleep 20
expect -re "(.*)

[Code]....

I know there is a better way to write this. I've tried multiple ways and this just happens to be the last way I've tried it. If you try running this, you'll notice that there is still carriage returns after the result of OLDEST_PATH and it prevents the 2nd "find" command from working properly.

View 2 Replies View Related

General :: Find Command When Loggin As A Normal User And Search For A File Passwd Under?

Dec 25, 2010

when loggin as a normal user and search for a file passwd under /etc. i get few errors with permission denied.how to ignore this permission denied errors.

csh hostname 109 % find . -name passwd
find: ./lvm/backup: Permission denied
find: ./lvm/archive: Permission denied

[code]....

View 4 Replies View Related

General :: Search Word And Delete Only The Word And The Line Using Sed Command?

Jun 28, 2011

Want to search for ~ and delete it as well as to append the entire line to the above line. For Ex:

1111xxxx date Sandy area is ~around this area.3222xxx date There seems to ~left side of map, the colours are accurate (showing green areas)Even if I ~zoom in, the green parks, xxx3258 date The dammed up
~away, the "other" body of water varies ~blackNatural gas leaching.

IT MUST LOOK LIKE:

1111xxxx date Sandy area is around this area. 3222xxx date There seems to left side of map, the colours are accurate (showing green areas)Even if I zoom in, the green parks, xxx3258 date The dammed up away, the "other" body of water varies blackNatural gas leaching.

View 4 Replies View Related

Ubuntu :: Bash - Open Mlocate Search Results?

Mar 22, 2011

Upon a while of searching, I think I failed to find the correct terms and I'm posting here. I often use mlocate to search for files. For example, if I say

Code:

$ mlocate temp_2.pdf

I'll get two results:

Code:

/home/kmc/Documents/latex/temp_2.pdf
/home/kmc/Documents/latex/test/temp_2.pdf

Now if I want to open one of them, I'll have to either open Acroread and browse to their locations. Or select and copy, and call acroread in terminal like

Code:

$ acroread /home/kmc/Documents/latex/temp_2.pdf

This is tedious to me. I'm thinking of a way of quickly open its search results, I've tried pipes like this but it doesn't work:

Code:

$ mlocate temp_2.pdf | acroread

maybe it doesn't work this way. So what does the trick? What's the name of this trick? I've googled for

Quote:

Linux bash catch output, pipe output, open mlocate results And is it possible to handle multiple lines of output, e.g., can I choose which line of output get forwarded to relative programs?

View 9 Replies View Related

General :: How To Use Command Prompt To Open Them

Sep 6, 2010

After contracting malware on Vista i decided to switch over to Linux and chose to start of with Ubuntu because of the graphical interface. that being said, you have no doubt inferred that i have no coding experience. basically i was hoping to find some nice tutorials and sites for Ubuntu. Also, i did downloaded the suggested programs and patches but im still experiencing problems with Adobe,flash, and and opening .exe files. for the latter, when i click on .exe files it is equivalent of using explorer on windows so i was wondering how to use the command prompt to open them. supposedly linux is susceptible to malware so if you could please suggest a anti -malware program.

View 14 Replies View Related

General :: Open Command With Pipeline?

Apr 9, 2011

What is the effect of pipe symbol in the second statement shown below? How does it differ from first one?

set nt [open "file" "r"]
set nt [open "|file" "r"]

View 9 Replies View Related

General :: Where To Open System Command In Centos5.5

Feb 5, 2011

I install Vmware in winxp sp3, then install centos 5.5-i386 release 2 in Vmware. I want to type some command like yum install ..., but where to open system command? I searched the menu applications places system on the top of the desktop, but I am not sure which one is.

View 2 Replies View Related

General :: Command Used To Find Out Open Ports?

May 28, 2010

What UNIX command do you use to find out the open ports in a system?

View 1 Replies View Related

General :: Gnome-terminal Command To Open Up A New Tab?

Aug 20, 2010

Are there a command to open up a new tab in gnome terminal(Ctrl+T outcome). I need it to use with in bash script.

View 2 Replies View Related

General :: Command To Check All Open TCP Connections?

Feb 22, 2010

What is the command to check all open TCP connections?

View 7 Replies View Related

Ubuntu :: Search In A Log File Via Command Line ?

Jun 3, 2011

I have some large log files that I would like to search for a specific text via command line in the file. I know I can open the file in GUI but is there command that I can run against the file path then make it search in the file in command line?

View 7 Replies View Related

Server :: A Database Based Search Command?

Jun 10, 2010

I was not in touch with linux for couple of years now. So I forgot a command I used to use. I recently installed Fedora 12 and I can not remember what was that command.Here is what it used to do: I remember that I used to run a special search command on server that used to find a file very fast because it was kind a database based command. To enable it for first time after linux installation, I used to build an index of computer's files and then I could use its command [don't remember if it was "find" or "search"].

So my question if anybody know what I am talking about and what is name of these two commands. How can I build the index first.

View 3 Replies View Related

Programming :: Awk Command - Search Pattern To Look For Last Occurrence

May 11, 2011

Any solution using awk/sed/regexp or other standard linux utility (this is for a mix of RH versions)? I am dealing with some very large application log files. I want to see everything that has been written to the log since the last application restart.

For an example take a log file like this:
Code:
# cat test.log
1 msg
2 msg
3 restart 1
4 msg
5 restart 2
6 msg

The following command is close to what I want:
Code:
# awk '/restart/,G' test.log
3 restart 1
4 msg
5 restart 2
6 msg

But the awk command grabs the first restart not the last. If it was working the way I wanted I would see something like this:
Code:
# awk '/restart/,G' test.log
5 restart 2
6 msg

So, I need something in that search pattern that says look for the last occurrence. I know how to do this with a pipe line - I could reverse the file and then do a similar awk and reverse back, or I could find the number associated with the last restart and then use that in the awk search. But these just take too long because the file is too big.

View 14 Replies View Related

Programming :: Sed Command Stuff - Search For Pattern?

Oct 3, 2010

I'm writing a script that edits a Maya ascii file. Inside the .MA(maya ascii file) there is a line defaultRenderGlobals. My script is supposed to find this line and according to what options they manipulate will update the lines below defaultRenderGlobals. I've got that working... but... the issue i'm having is that defaultRenderGlobals is only made when a the maya scene is made into a batch render. I want my script to manually addefaultRenderGlobals line into the .ma file if its not there and add the certain lines below it.RenderGlobals is already there I want to just manipulate whats below it. Hope this makes sense

View 2 Replies View Related







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