I have a huge log file of around 3.5 GB and would like to sample random sections in the middle of say 10 MB for the purpose of debugging what my application is doing.
I could use head or tail commands to get the beginning or end of the file, how can I grab an arbitrary portion from the middle of the file? I guess I could do something like head -n 1.75GB | tail -n 10MB but that seems clumsy and I'd need to determine line numbers for the midpoint of the file to get 1.75GB and 10MB line counts.
how to remove the 'Search and sort section' entirely from the GUI? I would like to only have the cover view in that whole area with just the library size and the buttons on top. I know you can set the cover view to open in a separate window, but then I have to resize the cover view window to cover that whole area every time I start calibre.
Would like to use Ubuntu Tweak on 10.10 beta. Is it safe to remove everything that its cleaning section finds? Or do I have to look carefully at what it removes? Can I just let it remove everything it finds and not worry that something I have installed will be affected?
You maybe know that VirtualBox has an "immutable" feature for HDD images. I.e. setup the system, if the stuff is in place, you can set the image to IMMUTABLE to prevent any changes to the image. Differences are written to a separated image. So on the next boot you'll see that all the (unintended) changes are gone and the "old" system is up & running again. I run an old SuSE 10.3 on a write-protected SD-IDE-Adapter. Changing and playing with RPMs is a mess due to around 50 changes I had to do to make that work. Is there any option to mount an SD-card as RO and having all the changes written to e.g. /dev/sda3? To make it clear: I thought about something like a RAID-X system, but could not find any description on how to setup a raidtab.
After install CentOS 5.3, when execute yum update in a terminal, with root I had this error:
yum update Loaded plugins: fastestmirror Config Error: File contains no section headers. file: file://///etc/yum.repos.d/CentOS-Media.repo, line: 17 ' #file:///media/cdrom/ ' I think I have something wrong with the repositories but I'm not sure.
########## some text text also includes empty lines ########## some more text ##########
Basically all sections are separated by 10 hashes and I need to somehow only print all lines in the last section (the "some more text" part in the example above"). I tried all kind of things with sed and awk but I didn't find any way to identify the last "section".
When I ls -l /etc/passwd, -rw-r--r-- 1 root root /etc/passwd When I login as myself, and rm /etc/passwd, it asks: rm: remove write-protected file '/etc/passwd'? If I say yes, will it actually delete the passwd file?
Dir - test - ls -ld shows ls -ld testdrwxr-xr-x 2 joe stduser 4096 May 25 16:25 testinside test dir :-rw-r--r-- 1 admin stduser 0 May 25 16:25 a.txtHow to remove a.txt with out using sudo ..I just tried sudo -u admin rm test/a.txtrm: cannot remove `test/a.txt': Permission denied
I installed the wrong file and now I would like to remove it. It was one of those .tar.gz files you have to install with ./configure, make, make install.I suspect files were installed all over the place.Is there a utility for removing a .tar.gz file ?
Code: [jonas@webserver html]$ ls -l | grep file -rw-rw-r-- 1 jonas jonas 3323 2010-03-15 20:33 file.php [jonas@webserver html]$ rm file.php rm: cannot remove 'file.php': Permission denied The directory that holds this file is html :
I have a Dell precision M50 which has the NVIDIA Quadro4 500 GoGL. When I upgraded from 10.04 to 10.10 the proprietary NVIDIA driver stopped working. At that time I found a simple solution which was to replace in the xorg.conf file the line in the Section "Device":
Situation as follows: i do su to root, then i create admin file with
cat > adminfile then i exit from root issuing exit command i can see following adminfile options -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile however, after executing rm adminfile it really gets removed -rw-r--r-- 1 root root 10 2010-06-16 16:25 adminfile
[Code]...
As i see it - others have only read permision for that file so they shouldnot be able to remove it.. :/
I have got certain files which somehow contain abnormal character "Del" "0x7f" or 177 which represents Del. And this is causing SVN to reject these files and abruptly end the process. I need to remove those characters from the file names but am not able to. find or grep do not search the files. This is how the file looks like with ls or find code...
According to security manual only DNS, files, or LDAP should be allowed in nsswitch file however it seems like i have many other services configured in nsswitch files.
below are the content from nsswitch file. What services can be removed considering the system stability.
Code: passwd: files shadow: files group: files hosts: files dns
i want to remove words "Max" and "constrained" in a file given below:
Max 0.003745 constrained Max 0.004549 constrained Max 0.001689 constrained
[code]....
and further want to replace "Max" by line number so that i can plot the resulting file. i searched in forum, but couldn't do what i wanted to do. e.g. i used
What does the warning 'section XXX type changed to PROGBITS' mean, and how do I avoid it? I'm compiling some code to run on a sub-processor, and I'm getting this warning during the linking stage.
I am running a bash script and I would like a command that will show me what differs from some files with similar names so I can delete them. Or if you can provide some info on how to complete my script. Here is my code:
#!/bin/bash pwd=SOURCE #Add extension into the name
If you create a file on UNIX/linux with special chars, like touch "la*, you can't remove it with rm "la*. You have to use the inode number(you can if you add the before the name, I know, but you'd have to guess as a user that it was used in the file creation).
I checked the manpage for rm, but there's no metion of the inode number. Doing rm inodenumber doesn't work either.
I've downloaded some files from the Internet Archive. They come in different file formats and most of the time I use pdf. However, sometimes the scans are saves in colour instead of b/w. This makes it difficult/impossible to read on a dedicated ebook reader. In that case I downloaded the djvu files as on the PC you can select which layer (color, bw,fore,back) one would like to see. Selecting the bw gives excellent results. However, the ebook reader does not has this option.
The question is, how can I remove /extract a layer from the djvu file and save only this layer.
So far I've tried the following two approaches:
1) select bw in the djvu viewer on the PC and printed to postscript file. Followed by a ps2pdf conversion. This works, but generates a fairly large pdf file. Sure, I can again upload it to any2djvu but it just seems to much manual work for each file.
2) I tried the shared annotation feature and said (mode bw). This works on the PC as desired but is ignored on the ebook reader as the other layers are still present.