General :: Use Sed To Edit A File?

Sep 4, 2010

I need to change one word in over a thousand pages of HTML. I think sed is the only way to do this, but I've never used sed before.

After reading the documentation, I see that it is pretty easy to alter files to standard output, in other words, the screen.

But I don't want to do just alter text to the screen, I want to alter the original file, else I am not doing any Stream EDiting as near as I can tell.

None of the documentation explains how to take a file, apply sed to alter that file. How do you do this?

Code:
[myuser@myhost dir]#sed s/changethis/tothis/ /mydir/myfile

How do I apply sed to actually make the changes to myfile?

View 3 Replies


ADVERTISEMENT

Ubuntu :: Edit File Inside It, Open It, Edit A File, Then Remake The Bin File?

Mar 3, 2011

I have a linux.img image for ubuntu.I want to edit file inside it, how can open it, edit a file, then remake the bin file?

View 7 Replies View Related

General :: Edit The Sudo File?

Apr 27, 2011

I need to have regular user run this command sync; echo 3 > /proc/sys/vm/drop_caches

but it requires root privileges that I cannot give.

So I figured they could run the command as "sudo". I looked in /etc/sudoers and wasn't sure what I needed to edit for the users to run the following command

sync; echo 3 > /proc/sys/vm/drop_caches

View 14 Replies View Related

General :: How To Edit Inittab File

Mar 25, 2010

The default setting of linux is run level 5 (Red Hat 9) I want to use my system in Runlevel 1. For that purpose i 1st check the permission which were

-rw-r--r--

I want to edit the File " vim /etc/inittab " in the terminal . which line should i edit so I may use it in a single mode.

2-The second thing i want to ask that before editing any important file which are /etc like "inittab" can i 1st make it's copy and keep it in my home directoty so,in case of any mistake I can get my original file?

View 2 Replies View Related

General :: How To Edit The Boot File

May 2, 2011

I installed 3 OS in my computer, first Windows xp, second Ubuntu 10.10 up to here I could go in to each one of them, but I installed Fedora 14 x64 after Ubuntu. Now I can only go to Fedora and XP, but I am not able to even see Ubuntu only in the shell, it is not in my boot options.

View 2 Replies View Related

General :: How To Edit Contents Table Of Pdf File

Jul 17, 2011

how do i edit the "contents" of a pdf file. I tried pdfedit but I cant find where the content table list is stored.

View 1 Replies View Related

General :: Edit Last Word On Each Line In File?

May 28, 2010

I have a file which a number at the end of each line. I need to change this number in the file to be correct, i.e. each time the number is 9 it needs to be 1, each time it is 233 it needs to be 2, etc... There is no pattern to the numbers currently in the list other than the same number appears only in a single line/group of lines, not throughout the file, but the replacements need to be sequential (but can be repeated an arbitrary number of times).

[Code]....

View 10 Replies View Related

General :: Cron / Crontab - Do Not Edit This File

Mar 19, 2011

I am trying to have the files from /user/directory copy every hour to /backup/user/directory. It would seem that cron or crontab is what I need to use. Looking at previous posts and other documentation only shows how much I don't know. When I type crontab -e I get a blank file I can type into, seemingly using vi as the editor. I have no problem with that but when I type cron -l, I get my text after a message about "Do Not Edit this File". What I am reading just makes no sense, I am not understanding even the most fundamental aspects of cron or crontab. Where I can get the most basic of basic instructions to try to understand this function?

View 4 Replies View Related

General :: Edit The Config File Of An Application?

Aug 20, 2010

I want to edit the config file of an application I have installed and the documentation says that the config file is per-user and therefore stored in "~/". Which folder is that? The app itself is installed in "/usr/local/bin/".

View 5 Replies View Related

General :: Edit The Config File To Show All IP's And Host?

Jul 19, 2010

Having a problem in my awstats, I'm a little lost to were to edit the config file to show all IP's and host so far its only showing up my IP and the PC's on my network and nothing else.

View 5 Replies View Related

General :: Edit Standard Configure File Using Script?

Jan 6, 2011

What I want to do is to find keyword in config file and change its value - that must be done using script.
I could write script usig awk and etc - but maybe there are already prepared ways/commands to change standard configure file setting?

View 1 Replies View Related

General :: Create _ Edit And View A File In System?

Oct 5, 2009

How to I open, create, edit, or view a file in Linux?

View 5 Replies View Related

General :: Edit An Existing Nautilus (file Manager) Bookmark?

Mar 4, 2010

Is there a way to edit an existing nautilus (fie manager) bookmark?

Invoke from Linux command line:

$ nautilus

Activate connection editor: File>Connect To Server...>

Complete entries in the pop up:

Service Type: [WebDAV (HTTP)]
Server: [localhost]
Port: [8001]
Folder [webdav]

[Code]....

View 1 Replies View Related

General :: Disk Based Text Editor To Edit File Larger Than Memory?

Aug 2, 2010

I am using Ubuntu and looking for a good editor to edit a file that is > 4GB. I just need to put content at the end and beginning of the file. I suppose I could use something like

cat "text to add" >> huge_file

To append to the file. Is that the route to go? What about prepending? In general, what is the best route if I wanted to edit somewhere in the middle?

I've tried VIM and it fails miserably. I assume emacs and nano would be even worse. What else is there? I assume to accomplish what I am looking for, the editor would have to be specifically designed for this by not keeping the entirety of the file's contents in memory.

View 5 Replies View Related

General :: Error Opening Terminal - Edit Sudoers File By Typing Visudo

Nov 13, 2010

Recently I migrated from Ubuntu to Debian, first thing i wanted to do was to give myself sudo permissions and lock the roir account. By default sudo group don't have permissions to do this on debian, so i wanted to edit sudoers file by typing visudo. But i keep getting this
error: Error opening terminal: vanilla How can i solve this.

View 1 Replies View Related

General :: Exit Bash Script - Add - Del - Edit User From Certain File Using Different CASE Variables

Mar 6, 2010

I have made a simple bash script through which i can add, del, edit user from certain file using different CASE variables. like
case
1. adduser
2. del user
3. edit user

Now i want to add a exit CASE like
1. adduser
2. del user
3. edit user
4. exit

Now i want to make a script such a way that, if user input is 4 then only script quit. I used with exit function also but it didn't work. if user press ENTER or other keys then also it quit the program.

View 6 Replies View Related

General :: Release File Lock In SAMBA 3.2.5 Share - MS Word - Filename - Is Locked For Edit

Sep 20, 2010

I'm having problem with the Samba 3.2.5 file share which host my MS-Word Document the user (user1) already restart her PC but still she cannot open the file from MS Word.

Here's the file and it's status on the samba drive:

Code:

How to reset the Samba file locking mechanism ?

View 6 Replies View Related

Ubuntu :: When Open Any .pps File With OO.org (impress), It Starts A Slideshow And It Doesn't Let Edit The File?

Aug 24, 2010

When i open any .pps file with OO.org (impress), it starts a slideshow and it doesn't let me edit the file. If i click on "end slideshow", the program exits.i ran it in a terminal and there's no error messages.[EDITED]Well, i found the answer, just renaming it to ".ppt".

View 2 Replies View Related

Red Hat / Fedora :: Edit A Text File To Delete All Commas In The File?

Jan 4, 2011

i want to find a command line way to edit a text file to delete all commas in the file. i do not want to replace them w/ anything.

View 2 Replies View Related

Debian :: How To Edit A File

May 13, 2010

I need to edit my xorg.conf file. I can navigate to it in Terminal but do not know how to open it. If I navigate to it outside of terminal I can change it but cannot save the changes (not allowed) I can't seem to find a "how to" for this. (Debian 504 on a Toshiba laptop)

View 3 Replies View Related

Ubuntu :: Can't Edit A File

May 7, 2010

I am trying to edit a C++ source file, but gedit wont allow me to save changes to it. Gedit says:

Code:
A file with the same name already exists. Please use a different name.

Right. Of course the file exists, I am trying to edit an existing file.

About the same happens with kate... Kate opens the file in read-only mode.

However, if I edit the same file with nano, editing and saving works. So the problem shouldn't be with access rights. Also "ls" shows rw rights to the file.

What could be the problem? I can use nano, but I would need the syntax highlightind, and other features of a better editor.

And whether I use sudo or not has no effect. The same happens with or without sudo, and I am the owner of the file.

PS. luckily I am still dual booting with Hardy. I can always go back.

Oh and this is a new installation of ubuntu 10.04

View 2 Replies View Related

Ubuntu :: How To Edit A Pdf File

Jul 8, 2010

What linux software is available that allows you to edit a PDF file?

View 8 Replies View Related

CentOS 5 :: How To Edit Php File

Nov 3, 2009

I have installed Centos on my pc. Then I installed Emacs for text editing. when I brows on www folder and try to open a php file it opens but I don't have permission to edit the filehow can I open a file with Emacs with edit permission?

View 2 Replies View Related

Debian :: Edit File As Admin?

Apr 2, 2011

I logged on, opened the terminal an logged on as su no problem Could not open the document I wanted to edit. I am trying to switch from USB 0 to USB 1 so I can listen to my Bose Speakers used to be Windows tech. Many years ago.

How do I open the file edit the file save the file. can I log on as admin and use text editor.

View 4 Replies View Related

Fedora :: How To Edit ISO 9660 File

May 1, 2010

How to edit a ISO 9660 file? I have one which I created using livecd-creator. Now I want to edit some of the files in it and save the changes. I have searched the guides and solutions for something and perhaps I overlooked it but I did not find anything.

View 5 Replies View Related

Ubuntu :: Way To Edit Pdf As Ether .odt Or .doc File

Jun 22, 2010

I need a way to edit a pdf as ether a .odt or .doc file and I read that I should be able to do that using Kword so i installed kword. However, when I try to open or import a .pdf there not listed at all. When I looked in the file format filter drop down menu I don't see PDF. I look in synaptic for any additional packages I might need and I didn't find anything that helped. I also did find and useful documentation on the koffice website.

View 1 Replies View Related

Ubuntu :: How To Edit A File That Is Read Only

Jul 5, 2010

i log in and went to the policy folder to erase the file prefernces.fdi and it would not let me delete this file /move it to the trash or even edit it it said something like you are not the owner ,so i could not change the permissions to overwrite this file.what should i do i just want to be able to change this file to true so it will see my internal sc dar reader right now when i put in a sd card it does not show up.i also tried changing this in the terminal there was a post on one blog that showed how ,but i was having trouble edit the xml file in the terminal so for me it would be easier to just overwrite the prefernces.fdi file since im a beginner.

View 3 Replies View Related

Ubuntu :: How To Edit The Grub File

Aug 22, 2010

i have to edit grub etc/default file but when i open it, it is a read only file (i have to put "i915.modeset=1" in it ) i think i need to do it through the terminal

View 4 Replies View Related

Ubuntu :: Edit The Grub.cfg File?

Oct 4, 2010

Since I updated my 10.04 LTS program from 2.6.32-24 to 2.6.32-25, both of these show up at the dual boot start up menu. Back when I had 8.04 LTS, I was able to edit my menu.lst file to delete past versions. How do I remove past versions from the grub.cfg file at present?

View 9 Replies View Related

Ubuntu :: Get Permission To Edit The File?

Feb 20, 2011

I hate ubuntu because EVERYTHING i need a permission. How can i edit an stupid file? Said i have no permission. **** IM THE ADMINISTRATOR, HOW CAN I HAVE TOTAL CONTROL ON MY COMPUTER -.-' ?

View 9 Replies View Related







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