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
ADVERTISEMENT
May 29, 2010
Open synaptic. Type in the word "Game". Then you have to scroll down through the list of results and mark each one, individually. Is there any way that I can simply mark ALL the results of the search? There is an "Unmark all" button. Can we get a "Mark all" button? It would have to mark only those packages that currently appear in the right hand box.
View 3 Replies
View Related
Jun 5, 2010
I've just installed OpenSUSE. I've never used it before. I typically use apt-get to install applications when using Ubuntu; so I'd like to use it with OpenSUSE. I've read some documentation saying that I need to go to YaST -> Software and search for "apt" or "synaptic." However, both of these searches yield no results. Additionally, using the Software Manager to search for these yields no results. What can I do? When I search for something in OpenSUSE and there are 0 results, I get HTML bold tags around the search criteria where it says there are no results (as in, I can actually see the code for the bold tag).
View 9 Replies
View Related
Oct 6, 2010
having only one instance of my search results
View 5 Replies
View Related
May 5, 2010
I have this multiline variable code...
View 5 Replies
View Related
May 14, 2011
I am using Files and Folders search application in Ubuntu 11 recent version. App that shows up on side. However I am not sure how clean its search result. I do not see any option.
View 2 Replies
View Related
Jul 12, 2011
I'm running Ubuntu 11.4. I've played with different versions of Picasa, installing the Linux version via Ubuntu Software Center and also using Wine. At a certain point I had several versions of the application installed and things were getting. When I search for Picasa in the Unity application search field (clicking the button with the dot in the centre at the top left of my screen) I got several results for Picasa, some of which when clicked would start Picasa and some which wouldn't. When I remove all versions of Picasa both from Wine and native I still get some results for Picasa which don't start Picasa when clicked.
View 2 Replies
View Related
Apr 29, 2011
I've just upgraded to 11.04 and really like it so far, everything seems to be running smoothly and I had no issues apart from a broken Emerald which I removed (and installed compiz-gnome and then made gtk-window-decorator the default, which fixed Unity segfaulting on Emerald).
My problem now is that when I use the Unity dash to search for something, it takes a while to search and then finds nothing. I'm pretty sure I should have things like "text editor", "gimp", "update manager", so I would think this is some manner of bug.
In addition to that, the following buttons don't do anything if I click on them:
- Media Apps
- Internet Apps
- More Apps
- Find Files
View 9 Replies
View Related
Aug 14, 2010
Dear experts,I have a question about open() function of gcc3.4.6.I write a example:
Code:
using namespace std;
#include<iostream>
#include<fstream>
int main()
{
[Code].....
It can be compiled and ran.The statement file=txt_stream_file is in order to change char* to const char*. But open() function is not work,and out: can not open plots/results.txt The open() function of gcc3.4.6 is:
[Code]....
View 4 Replies
View Related
Feb 13, 2011
SU results in Cannot execute bash: No such file or directory.
View 1 Replies
View Related
Jan 12, 2011
I am at the moment using Ubuntu 10.10 with the default color scheme. If I open a bash terminal and type ls -l / I get the results with most information in white on the standard purple background, most directory names in blue on the normal background, tmp in blue on a green background, a file name in white on the normal background and links in teal on the normal background.
So in this situation I am wanting to figure out what the green background behind tmp signifies. I have searched for information about bash color codes and I find hundreds of links regarding how the CHANGE the colors. I have yet to find one which explains what the colors mean.
View 3 Replies
View Related
Sep 15, 2010
I am querying a single string column in a table. The string values have spaces in them. I want to loop over each value in bash. I set IFS to split lists on newlines instead of spaces. When I try this, it is splitting the list of results on the actual character 'n', not the newline ''.
DATA=`mysql -u root -ppassword --silent 'SELECT name FROM table_a;'`
IFS=$'
'
for i in $DATA; do
echo "item = $i"
[Code]....
View 5 Replies
View Related
Apr 25, 2011
how I can search within a variable and assign the results to a new variable. I'll use the following as an example -
cars="Audi BMW Cadillac Chevy Dodge Ferrari Ford Mercedes"
list=`echo ${cars} | egrep -o '<A?+|<C+'`
with the echo command I get the following output assigned to list -
A
C
C
What I'd like to get for output is -
Audi
Cadillac
Chevy
how I could do this regardless of upper/lower case letters?
View 5 Replies
View Related
May 5, 2011
(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:
Quote:
#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)
[code]....
*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.
View 4 Replies
View Related
Jul 13, 2010
What keyboard shortcut will give me a regexp reverse search in bash? Or does C-r supply something like that already that I can't figure out?
View 4 Replies
View Related
Nov 28, 2010
I need to search for a string "teststring" in all *.java files coming under /home/user1/ (including subfolders). How can I do it in linux via shell command.
View 5 Replies
View Related
Dec 19, 2010
total newb here. call me a script kiddie if you want but here is what i need to do and what i have.
need to:search a hidden log file for a specific string, find what comes after that part, and then output the result to a variable or something that can be used by an application or other script to carry out further actions.
View 3 Replies
View Related
Oct 9, 2010
I'm trying to use Bash to search some directories for a word in one of documents. I've tried:
Code:
$ grep -R Brzeninski /media/disk-1/Dual_Data/
but It never returned a prompt, and i'm not sure what grep means or does.
View 1 Replies
View Related
Jul 23, 2011
Having gone through the /etc/cron.daily directory I noticed that there is only the mlocate.cron file in comparison to what I have seen on other material where they cite slocate.cron. Is there a difference between these and their respective commands and if so what are they?
View 1 Replies
View Related
Jul 7, 2011
I need a command to search a string in a file and then to convert the next string in the same line from hexadecimal to binary. I was able to put everything in capitals. The original file can be as such:
E 2
C 1 794
T ffff
E 2
C 1 787
It is not always FFFF! I am trying to do this in a file at once, not reading line by line (using while).
View 5 Replies
View Related
Oct 8, 2010
Bash acts weird in 10.04 server. Whenever I try to run .sh scripts, every empty line in the script results in "command not found". Then on even simple scripts I get syntax errors, but the same exact scripts work on my 9.10 desktop installation. There's also another problem, I'm not really sure if it's bash-related. After setting the proxy using
[Code]...
View 5 Replies
View Related
Aug 23, 2010
64-bit lucid lynx server (gnome) According to Ubuntu Software Center, Tight VNC Server is installed. However,mlocate doesn't show any vnc files in any *bin directory
ps -A doesn't show a vnc service running none of the menus have an item for vnc server
I can connect to the ubuntu computer from Windows tightvnc clients on two different windows boxes. I can use the keyboard to type in the password. After that, remote control, i.e., the mouse, doesn't work.
The problem is that the mouse cursor (controlled from the windows client) moves but otherwise has no effect. I can move the cursor, but it acts as if the client (or server) is set to view-only. The effect of that is that I can't launch any programs (not even a terminal).
I've tried various combinations of settings on the client and on the server, but I can't get it to work correctly.
On the ubuntu machine, remote desktop sharing enabled.
on some earlier versions of ubuntu this worked correctly when connecting from the same windows client using tightvnc.
I tried connecting from another windows client and got the same results.
View 3 Replies
View Related
Jun 8, 2010
how to set the subject of this up.. but here is what I am trying to accomplish (please keep in mine, this is only my first month playing with ANY Linux programming): My shared web host limits running 2 CRONS or 2 SSH sessions at one time. I need to run more than that.. So, my solution is to run what I need on my home computer, and then push all the results via SSH to my web server.
To keep things timed, I am trying to call 4 bash scripts from inside of 1 bash script... Each bash script has variables I need to export out to the remote (web) server. Being that I can only run 2 SSH or 2 CRON sessions on the remote, it wouldn't do me any good to open up CRON or SSH remotely or locally - either way I'm maxing out. That is why I would like to call 1 final script that takes the output of the 4 bash scripts and does the job.
Main bash calls via CRON every 30 minutes:
Code: ./script_1 &
./script_2 &
./script_3 &
./script_4 &
[code]....
I need to scp the file saved by wget to the remote server. I also need to pass the SQL statement generated in each script as a command in SSH. I'm lost how to get the info from "script_x" into a string that can be used to SSH - and doing this all inside of ONE SSH command. Would I store the SQL strings in a file and call that in the SSH command line?
If so, what is the command to make sure the variable output in the "script_#" file is sent to a file? Can I call the variable from the main Bash Script? Now - the good news is, I can SSH from my local machine to the remote one.That is about as far as I got.Again - I am so new to this that my ears are still wet. This has been something I have been working on for a while, and I'm just lost at this point.
View 2 Replies
View Related
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
View Related
Feb 19, 2010
[URL].. One of my reference link: A very good place for search for drivers since many hardware manufacturers do not have a driver site for open source.
View 1 Replies
View Related
May 24, 2010
I have a text file that currently has around 150 000 usernames in it. I need to somehow group them into smaller groups of 1000 and then add that value into the DB. for example user xzy group 1 (hopefully the groups will be digits incrementing)
[Code]....
how to search for 1000 then assign them group 1 and then 1001-1999 to group 2 etc.
View 3 Replies
View Related
Apr 6, 2010
I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't do what I want:
$ time ./foo > /dev/null >> output_from_time_command.txt
View 1 Replies
View Related
Jul 6, 2010
# mlocate
bash: mlocate: command not found
and
[code]....
View 5 Replies
View Related
Nov 17, 2010
I'm trying to create a bash script that will open firefox, evolution, gedit (specific file), etc. For the most part it works, but after it opens evolution or gedit, it pauses execution, until I close that app down.
I don't want to have this done at login, i want to pick and choose when I open them all.
View 2 Replies
View Related
Dec 12, 2010
How do I use bash to open a file, (file name as first parameter) cut n char from begin of each line, and write shortened lines to new file (outputfile name as the second parameter, n as the third parameter)
View 3 Replies
View Related