General :: View A Particular Ten Lines In A Large File Where Can't Open The File In Vi

May 12, 2010

I am using RHEL 5.I have a very large test file which cannot be opened in vi.The content of the file has some 8000 lines.I need to view ten lines between 5680 to 5690.How can i view these particular lines in a large file.what is command and option i need to use.

View 1 Replies


ADVERTISEMENT

General :: View File Ignoring Set Of Lines?

Jun 21, 2010

I'm having a file with repeated particular text lines. So I need to view the file content ignoring these lines. Is there anyway I can achieve this using VI

View 2 Replies View Related

General :: File Privileges - Check And Set Who Can View Or Open A Given Folder Or File?

Jul 30, 2010

How can I check and set who can view or open a given folder or file?

View 1 Replies View Related

General :: Replace Several Lines In A File With Other Lines In Another File?

Oct 26, 2009

I have this massive table file with some data in it and I want to replace some lines that are wrong with the correct ones that are in another table file of the same format. The wrong lines are not all together in a block but randomly distributed so I need to make a loop checking if the line is in the other file and if it is, replace it. I want to try and do it with sed or awk but I don't really know how to....

View 12 Replies View Related

General :: Script To Insert Number Of Lines In A File To The Start Of The File?

Sep 17, 2009

I'm looking for a way to insert the number of lines in a file to the start of the aformentioned file. This should be simple but as I am not used to scripts in Linux, I am finding it tough going. I can find the number of lines in a file easily enough via

filesize=$(awk 'END {print NR}' $1)

but as for inserting this into the first line, i'm failing to do so. I've tried some of the other approaches on these forums but none so far have been able to do so.

I've tried:

sed '1i$filesize' $1

but sed i requires a string, not a variable so no go I've also tried:

mv "$1" "${1}.bak" 2>/dev/null || touch "${1}.bak"
cat $filesize "${1}.bak" >"$1"

but again with no luck as cat seems to need an input stream Just to recap, i want to insert a line at the start of a given file that holds the number of lines the original file has.

ie the file:

a
b
c
d
e

should become:

5
a
b
c

[code].....

View 3 Replies View Related

General :: Removing Lines From A File That Are In Another File?

Jan 6, 2011

I have a large text file containing over 180k lines and another text file containing about 1k. I would like to remove lines in the 180k-line file that exist in the 1k-line file.

View 5 Replies View Related

Fedora :: Plugin To Open Pdf Files In A New Tab, Acroread Does But Doesent Remember The Last View Of The Last File Opened?

Apr 24, 2011

I was looking for a plugin to open pdf files in a new tab, acroread does but doesent remember the last view of the last file opened. So, is there a way to open pdf files through evince or okular within FF?

View 1 Replies View Related

General :: Cannot Open File In RW Mode - Filling Root File System With Log Files

Nov 3, 2010

I work for a company that makes portable devices running Linux and I was recently asked to make the underlying file system read-only for "security" purposes. Since the distribution is based on LinuxFromScratch, I know that very little writing happens at run time. So, even if the device runs on a usb flash device, I doubt that putting the root file system RO will be that beneficial. I am actually more concerned about a process actually breaking because it cannot open a file in RW mode than a process going rogue and filling the root file system with log files, etc. I'd really like to ear what kind of advantages disadvantages there really is with read-only file-systems.

View 6 Replies View Related

General :: 6.13 GMP-5.0.0 LFS Make Error - Cannot Open Shared Object File: No Such File Or Directory

Jun 10, 2010

I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:

error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'

[code]....

View 5 Replies View Related

General :: (xubuntu) Click On Webpage File And Open File With Emacs?

Aug 26, 2010

I am using xubuntu and there are a few types of files on website that instead of downloading and saving and then opening with emacs, I would rather when the radio button choice comes up say open with emacs. I am using xubuntu with xfce, and there is no line for a command to be entered as some ubuntu editions have. In the choice of changing the opening program from mousepad to something else, it says search and allows to navigate to find a program, but I cant find emacs anywhere not in etc/ or elsewhere. So where is its executable to direct the program chooser to?

View 1 Replies View Related

General :: Libgtk-x11-2.0.so.0: Cannot Open Shared Object File: No Such File Or Directory

Mar 28, 2010

I'm trying to install PCSX2 (PS2 emulator) and I get the following error: ./pcsx2: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

I've followed the instructions here http://pcsx2.net/downloads.php and believe I have all the dependencies installed. My system has the following file:

/usr/lib/libgtk-x11-2.0.so.0

View 6 Replies View Related

General :: Open Local File Error When Creating File Descriptor?

Sep 14, 2009

error message when I ran my program that I couldn't open my local file. I have two files first one is called client, second one is called server I am using named pipes to sent a message from client to the other file called server in client I used mknod() to create the two named pipes,one for read,one for write and created new thread in client using fork() spawned a child process that executed the server file both named pipes are opened the client file got the message from the user and sent it through the named pipes to the server file when the server receives the message , it needs to verfify it is correct in the server file, a local file descriptor is created to read and send this verifing message when it is not correct but I am getting an OPEN() error when I tried to open this shared local array buff and attach it to a file descriptor where the message is kept why do I get this error in server file

int main()
{
/*both named pipes are open*/
rfd=open(IFIO1,0);
wfd=open(IFIO2,1);

[code]....

View 1 Replies View Related

OpenSUSE Network :: Add Few Lines To Php.ini File And Modify Suhosin File?

Dec 29, 2009

Is installing "php5-suhosin" from yast and restarting apache enough to make suhosin work out of the box? Or do I need to add few lines to php.ini file and modify suhosin file?

View 3 Replies View Related

Ubuntu :: Netbeans - Whenever The File Contains More Than 3000 Lines,the File Is Not Readable?

Mar 4, 2010

HI am facing the strange issue in netbeans on ubuntu 9.04. whenever the file contains more than 3000 lines the characters overlap on each other and the file is not readable, where as if the file is less than 3000 lines it works fine. what may be the reason ?

View 2 Replies View Related

Programming :: Sed Delete Lines From File One If Regexp Are Listed In File Two?

Sep 17, 2009

I am trying to delete lines of a file if they contain text that is present on another file. For example

> cat one.txt:

a
b
c
d

[code]....

I get the following output:

> ./test.sh one.txt two.txt
a
b
d
e

[code]....

View 6 Replies View Related

General :: Best Way To Copy A Large File Over NFS?

Aug 24, 2011

I want to transfer a huge file (60GB) over the NFS network on linux. Is cp the best option?

View 1 Replies View Related

General :: Can't Copy Large File?

Mar 26, 2010

I'm trying to copy a 6Gb file across from my laptop to an external usb drive but it quits at about 4.2Gb every time with a "file size limit exceeded" error. i have checked the output of ulimit -a and there is no limit there on the file size. I'm using the Slax live Cd for this as it always gets the job done

View 8 Replies View Related

General :: How To Verify If The File Is Binary Or Text Without To Open The File

Sep 7, 2010

how to verify if the file is binary or text without to open the file

View 2 Replies View Related

Programming :: Insert Each Line Of One File To The Another File After Certain Lines?

Jul 2, 2010

i have two files with thousands of line, I am trying to combine these two files but i want to insert each line of one file to the another file after certain lines. I am using awk with the following command but it does not work.cat file1 | awk ' { print $0; if (NR%3004==0) {print "file2"}}' > outputfile

View 14 Replies View Related

General :: Extracting Tar File: Cannot Open: No Such File Or Directory?

Jul 19, 2010

I have a remote Debian 5 machine on which I'm trying to extract a tar-file (Django 1.2.1, but that's unimportant). The first 1300 or so files extracts just fine (of about 2800 in total), after which errors liketar: Django-1.2.1/tests/urls.py: Cannot open: No such file or directoryshows up for the rest of the files, finally ending up with atar: Error exit delayed from previous errorsI use the commandtar xzvf Django-1.2.1.tar.gzI've also tried with sudo (but I'm extracting in my home directory, which I should obviusly have permissions to use without). I've tried gunzipping first (runs flawlessly) and then running tar xvf, but to no avail. I've fetched the file using wget:

View 1 Replies View Related

General :: Open A Script File (same File Every Time)?

Aug 12, 2010

I need to goto a folder, open a script file (same file every time). The file has different function calls, I need to comment all other function calls and just un-comment the one I want to use.

#call_1
call_2
#call_3

[code]....

View 14 Replies View Related

General :: How To Send A Large File Securely

Aug 28, 2011

I need to send large files from a Linux machine to another using cryptography. The sender machine knows the recipient IP but not vice-versa. I don't need strong cryptography and prefer higher-speed less-secure solutions.

There are no problems with presharing crypto keys but I'd prefer not dealing with SSH users creation.

I think to HTTP PUT over TLS, but I never had experience with it and I prefer to hear which are the possible solutions. I know that it can listen as a daemon but I don't know anything about cryptography. So pipeing with OpenSSL may be a solution.

View 2 Replies View Related

General :: Using Sed To Replace A *large* Number Of Variables In A File?

Jul 28, 2011

I have a large number of log files, on a linux box, I need to cleanse sensitive data from before sending to a third party. I have used the below script on previous occasions to perform this task, and it has worked brilliantly (script was built with some help from here :-)

#!/bin/bash
help_text () {
cat <<EOF
Usage: $0 [log_directory] [client_name(s)]
EOF

[Code]...

However, now one of our departments has sent me a CLIENT_FILE.txt with 425000+ variables! I think I may have hit some internal limit. I have tried splitting the client file into 4 with around 100000 variables in each, this still doesn't work. I'm loathe to keep splitting though as I have 20 directories with up to 190 files in each directory to run through. The more client files I make, the more passes I have to do.

View 2 Replies View Related

General :: Compress A Large File Into Smaller Parts?

Aug 18, 2011

I'm looking for a way to compress a large file (~10GB) into several files that wont exceed 150MB each.

Any thoughts?

View 2 Replies View Related

General :: Monitoring Copy Progress Of A Large File?

Sep 15, 2010

Is there a clever way to monitor the progress (as percentage or hash) of copying a large file (using pv could be an option)?Like monitoring the progress of a copy command such as this:Code:cp linux.iso /tmp/

View 2 Replies View Related

General :: Backup Large File To Multiple DVDs

Nov 2, 2009

I work for a school consulting company.We helped a school deploy about 1500 computers.The computers have windows XP but we have been using G4L for the restore partition on the drives.So far the software works great. We did however run into a problem in that many of the computers we deployed are missing the restore partition. The reason they are missing is long and convoluted and not really that important. What I have been charged to do is try and fix the restore partition problem. One solution that I had, which im not even sure if it will work, was to backup the recovery file, that g4l created, to DVD and write a basic script to recreate the partition and then copy the file over. This process would need to be as automated as possible since this disc will be inserted by the end user(the students). The backup file that g4l created is 5.9GB so it wont fit on just one disc and Dual layer discs are too expensive to use for this project, so the file will either need to be compressed again (not sure if that's a good idea or not) or split across two DVD's.

I have searched the forums here and I was not able to find anything to fix this problem. I was able to find some info on splitting files across two discs but im not sure how to use that to fix my problem.

View 5 Replies View Related

General :: Cannot Find Large Untared MySQL File

Aug 6, 2009

After untaring a mysql file (very large) I'm trying to find where the file listed below has gone. I did a search on the file name:
fine / -name 'mysql-qui-tools-5.0' -print
But can't find the file.
-rwxr-xr-x root/root 9651820 2007-05-02 11:46:01 mysql-gui-tools-5.0/mysql-query-browser-bin

View 6 Replies View Related

General :: Add Characters To Several Lines In A File?

Apr 17, 2009

I would like to modify the content of a text file in Linux, in the following way:=> the file has several of these lines:./run_pest3 ./g134366.04080_0.062 x 2_d043 1 0.43 results_EC=> I want to modify all lines to be:./run_pest3 ./g134366.04080_0.062 x 2_d043 1 0.43 results_EC0.062i.e., the last number of $2 should be "attached" to the end of $7, for each line.

View 5 Replies View Related

General :: Extract Lines From File Using AWK ?

Aug 5, 2010

I have a file similar to this:

I need to print the last line for each user into a file. The resulting file should look like this:

Is there a way that AWK can match lines from $1 and then print the last line into a file?

View 7 Replies View Related

General :: Adding Lines Of A File Together?

Feb 22, 2010

I'm trying to output two certain fields of a very large text file to 2 very small text files. Then take those files and add all the lines together to come up with a total from each file (two totals).

Here's what I've got:

Code:

#!/bin/bash
echo "0" > /media/in.txt
echo "0" > /media/out.txt

[code]....

Breakdown: Put 0 in a text file to be drawn by respective while loops for math later

Output last 60 integers to a file for total A (new integer every minute)
Output last 60 integers to a file for total B (new integer every minute)

The two while loops are supposed to be adding the lines together. The echo commands at the end are for testing purposes, just to see the output. However, when I run this, I get the output of

Code:

0 0

Which is obviously not what it's supposed to be. Is there a more efficient way to do this or am I missing something in the script that would reset the values to "0"?

View 2 Replies View Related







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