General :: Edit All The Files Returned By Find In Vi?
Sep 15, 2011
Something I find myself doing a lot is running a find command and then editing all of them in vi, which looks something like this:
> find . "*.txt"
./file1.txt
./file2.txt
./path/to/file3.txt
> vi ./file1.txt ./file2.txt ./path/to/file3.txt
Is there a clever & simple way to do this all in one command line?
View 3 Replies
ADVERTISEMENT
Nov 11, 2010
Im trying to change a group to have read write and execute permissions on everything in the system through command prompt, some people told me to edit the /etc/group file but i don't have a file that exists there under that name, but the group does already exist, i just don't know where its located. Anyone have a clue where i can check or what to do ?
View 2 Replies
View Related
Feb 4, 2011
I use a linux machine at work and a mac at home. I can ssh from my machine at home to my work machine. But the only editor that I have access to on the command line then is vi, which I don't like.
Is there a way to use gedit on my mac to edit files remotely over an ssh connection?
This page says that it can be done, but I think that it assumes that you are using gedit on ubuntu. On my mac (os 10.5.8) I don't have the "bookmark" option when I click "connect to server".
[URL]
View 3 Replies
View Related
Jun 28, 2010
I have a directory with hundreds of html files.
For all the files I have to:
- delete all the row from the beginning of the file to the sentence "<img src="immagini/_navDxBottom.gif" />".
- delete all the rows from the sentence "<br clear="right" />" to the end of the file.
How can I do that?
View 3 Replies
View Related
Feb 9, 2011
Is there an aplication/software that I can use to edit the Microsoft publisher (.pub) format files on fedora14.
View 1 Replies
View Related
Jan 24, 2010
I'm needing to read the Adam's Assembly Tutorials, that are old EDIT *.txt files, I'm on Linux and I need to read this files.What can I do?Is there any GUI editor that can read the files?There is any way to convert them into another file that is more modern1?
View 2 Replies
View Related
Jul 31, 2011
What's the fastest and most reliable way of working on files on a remote linux machine with emacs on a windows host machine? I need to be able to easily copy and paste text between emacs frames and use all the keyboard shortcuts, so putty and cygwin are out of the question. I've tried tramp mode but it just hangs when I try to connect.
View 3 Replies
View Related
May 4, 2010
I'm using mrtg to generate html files. With mrtg , i use indexmaker . Inside html files , i have found some html tag like "<SMALL>some text</SMALL>".
There is the manner to delete text inside two tags ? With bash script?
View 1 Replies
View Related
Sep 11, 2009
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
View 10 Replies
View Related
Jul 15, 2011
Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.
View 2 Replies
View Related
Oct 31, 2010
Reading and revising LaTex 20-page documents seems to be much more easier with a printout (hardcopy) then reading them off a screen. However, I cannot edit the document in real-time (just scrabble comments on the paper) which is cumbersome.
So it there a tablet or even better an ebook device (with e-ink which is easier on the eyes) where I can read document similarly to a printout and edit them in real-time?
View 5 Replies
View Related
Aug 14, 2010
i have read how mount floppy image (*.img) but how edit by adding files?
View 4 Replies
View Related
Jan 25, 2009
I know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"
View 1 Replies
View Related
Apr 7, 2011
I have the following problem:
CASE_FOLDER
----------->0_FOLDER
-------------------->ForceX ForceY ForceZ
[code]...
View 1 Replies
View Related
Oct 9, 2010
I can ssh to the server but it wont allow me edit files, even though I have basic text editors like gedit and notepad installed on my windows computer. Anyone have an idea what the problem is? (I get an error message like this-(gedit:23978): Gtk-WARNING **: cannot open display
View 3 Replies
View Related
Oct 20, 2009
I suspect that this has come up numerous times, but I am new to Linux and I am setting up a new in-house server using Ubuntu 9.04 and Apache, etc. I can see the welcoming "It Works!" message when I log in via Firefox. I can see "index.html" when I FTP the server with the site name and password at /var/www. I can also see the -rw-r-r-- attributes, but I can't edit the HTML file or replace it. When I try to rename the "index.html" file.
I get the following message: "Request denied. Verify that the file or folder exists and that you have the necessary permissions on the server to perform the requested operation."
I haven't been able to determine where to enter the password or what changes I need to make to be able to work with the /var/www directory via FTP.
View 4 Replies
View Related
Oct 5, 2010
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies
View Related
Aug 17, 2010
need to edit my menu.lst but can't find it.
View 9 Replies
View Related
Feb 8, 2010
According to this article, one could create a custom keyboard layout.
While i look in the /ect/x11/xkb/ repertory i find a base.xml file only, no keyboard layouts as the article suggests.
Where can i find my keyboard layouts so i can edit them?
View 3 Replies
View Related
Jul 12, 2011
I'm newbie to Linux. I have installed on my desktop the version Ubuntu 10.04 LTS.
My question is: Where can find my CLASSPATH file, in order to edit it?
View 1 Replies
View Related
Feb 23, 2010
i am trying to run an application code in nfs host.but facing the problem as shown below.can anybody tell what the problem could be?
[code]...
View 2 Replies
View Related
May 21, 2010
I am playing around with pthreads. This program however blows up.
#include <iostream>
#include <pthread.h>
using namespace std;
struct myStruct
{
int a;
string msg;
};
void * myProc(void *arg)
{
struct myStruct* str = new struct myStruct();
str->a = 10;
str->msg ="hi";
return (void*)str;
}
int main(int argc, char **argv)
{
pthread_t mythr;
int status ;
void *retVal;
struct myStruct* m_str;
status = pthread_create(&mythr,NULL,myProc,NULL);
status = pthread_join(mythr,&retVal);
cout<<"Status is"<<status<<endl;
m_str = (struct myStruct*)m_str;
cout<<"retval is "<<m_str->a<<" "<<endl;
return 0;
}
Can a structure be returned by a thread as its return value ?
View 1 Replies
View Related
Oct 12, 2010
i installed ubuntu inside windows but someone instead of uninstalling it directly deleted the ubuntu folder inside windows ,thinking that the partition will be deleted. but when i restarted the system and command prompt came and said unable to find boot record and i couldn't boot windows as well and a grub prompt came like grub>, then i inserted the windows boot cd and repair the boot record error but my problem is , instead of doing this way, can i do so by grub prompt directly without using winidows cd.
View 1 Replies
View Related
Jul 20, 2010
Filename.txt
Code:
My First Line
My Second Line
::::While Loop:::
Program:
Code:
while read line
do
echo "$line"
done < Filename.txt
output:
Code:
My First Line
My Second Line
Is it possible to use for loop to get the same output. I have tried executing below code but I get every word of my file being displayed one below above.Is there any way I can modify the for loop code to get the output returned by while loop?
:::For Loop:::
Program:
Code:
for line in $(cat Filename.txt)
do
echo $line
done
output:
Code:
My
First
Line
My
Second
Line
View 8 Replies
View Related
Jan 21, 2011
I have a lot of mp3 files without any ID3 tag information. This is very annoying, because my iPod does not show them correctly. My Banshee shows them as "unknown artist" and the title. I would like to find them all in a bunch to batch update them.
View 2 Replies
View Related
Jul 24, 2010
We have a huge amount of duplicate files in a folder and I would like some pointers on to writing a bash script to create a list of the duplicate files. I've seen examples that check for the md5 sum of files... but I dont need that, the file name is enough.
View 4 Replies
View Related
Nov 30, 2010
Say someone logs into a Centos Linux box and SCPs a file from /root/ called 'textfile.dat'
Is there any way to log into the Centos Linux box, later, and see that textfile.dat was SCP'd from the box?
View 9 Replies
View Related
May 31, 2011
I used following command to sort one day older log files
Quote:
find /opt/TimesTen/tt_transaction_log/ -name "mtsDB.log*" -mtime +1 -print
following are log files which are existing, I have to delete one day older files from this location but when use above mentioned command it won't print one day older files, as i understand "-mtime" modified time, "+1" means one day older. am i correct?
Code:
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:11 mtsDB.log126985
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:17 mtsDB.log126986
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:23 mtsDB.log126987
[code].....
How can i print one day older logfiles?
View 3 Replies
View Related
Jun 8, 2011
To find the space occupied by files modified more than 4 years ago, i tried following.I am wondering if it is right ?
Code:
find /temp -type d ! -name ".*" -mtime +1460 | wc -l |du -sh
I tried this, but this sits there for long time (of couse the path i tried has lot of files) So i am not sure if this is right.
P.S.:
SHELL=bash
OS=RHEL5
View 9 Replies
View Related
Nov 23, 2010
find text within files? detailed at Code: man grep
View 2 Replies
View Related