Programming :: Delete Gaps In Directory In A Ext2 File System?

Nov 1, 2010

Directories(-entries) are in a EXT2 file system
managed in a singly linked list.
Delete files in the directory causes Gaps or holes to appear in
the linked list of the directory.How does a C-source code look like,
which would reorganize this list and remove the gaps or Holes.

View 5 Replies


ADVERTISEMENT

Red Hat :: File System Corruption - Super Block Could Not Be Read Or Don't Describe A Clear Ext2 File System

Jul 12, 2010

My Redhat Enterprise Linux 4 with 6x partitions (/, /boot,/home, /usr, /var, /tmp) of 6.0 GB IDE Hardisk was working quite fine. I decided to create LVM on /home and /var partitions but due to some errors occured and I delete the /home partitions. That's why partition table altered. I then delete 4,5,and 6th partitions (/home, /var, /tmp) partitions and now try to create one by one but following error is coming:-

[Code]....

The Super block could not be read or do not describe a clear ext2 file system. E2fsck b 8193 <device> I have tried following commands,but could not successful:- e2fsck -p /dev/hda7 (where hda7 was created but afterthat it was deleted) e2fsck -a /dev/hda7

View 2 Replies View Related

Programming :: Directory Record Length Is Variable In Ext2 Filesystem?

Jan 7, 2011

The declaration for directory record length in ext2 filesystem is as follows:

Code:
#define EXT2_NAME_LEN 255
struct ext2_dir_entry_2 {
__u32 inode; /* Inode number */
__u16 rec_len; /* Directory entry length */
__u8 name_len; /* Name length */
__u8 file_type;
char name[EXT2_NAME_LEN]; /* File name */
};

Some say because the record is not in a fixed length so rec_len is the real record length. Why is the length of the array `name' not fixed? I thought C arrays like this should be fixed length. C99 has variable-length arrays, does this structure count on C99?

View 7 Replies View Related

Ubuntu :: Locate An Ext2 Or Ext3 File System By Using The Terminal?

Nov 13, 2010

how can i locate an Ext2 or Ext3 file system by using the terminal?

View 2 Replies View Related

Server :: Mounting Ext3 File System As Ext2 On Slackware With Custom Build Kernel?

May 16, 2010

I just rebuild the kernel for slackware 13, everything works, but root file system which is ext3 is mounted as ext2. Normally I've build ext3, ext4 and so on as modules, not in the kernel... but if I do this, then the kernel mounts the file system as ext2, which is build in the kernel. I also modified rc.modules so I can make sure that ext3,ext4,jbd are loaded, but it doesnt work.

View 2 Replies View Related

Ubuntu :: Sh:grub - Root Mount File System Failed ... Ext2 Ext3 Ext4

Mar 27, 2010

I have dual boot system..i.e, windows XP and ubuntu 9.10(insatlled side by side). when i try to boot ubuntu, Im gettin sh:grub > prompt

[Code]...

I am getting something like this.. root mount file system failed.. ext2 ext3 ext4 ....... kernel panic message and hanged at kenelthreadhelpper+ what can i do.. I cant reinstall ubuntu again.. Because I have installed nany application there..

View 1 Replies View Related

Programming :: System() Routine Returns: Access: Unix Error (2) No Such File Or Directory

Oct 23, 2010

I am running shell command through C program using system() routine.

I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory

But when I give the complete path to the executable it runs perfectly.

The executable is installed in "/usr/local/bin/" And the path variable has this path.

View 1 Replies View Related

General :: Can't Delete The EXT2 Partition

Oct 31, 2009

I had to install a new disk drive in my PC a week ago because the old drive died. The new drive is a 160 gig drive. First I installed Win XP with S/P 3 and everything was fine. Then I installed Ubuntu 8.04 and the troubles began. Ubuntu resized the Windows partition down to 8.81 gig and used the other 137.44 gig for Ubuntu. When I booted into Windows I started getting nasty little messages about "not enough disk space". SOOoooo....... I booted using the Ubuntu install CD and ran "sudo gparted" in a terminal window. I tried to resize the ext2 partition but got an unknown error.

Then I ran fixmbr in Windows to get rid of grub. Then I tried running gparted again to delete the ext2 partition. Got an error that said "can't delete the partition because it's mounted". So I tried to unmount the partition but got a message that the command "unmount" could not be found. After that I installed Partition Magic in Windows and tried that. It sees the ext2 partition but says it's unsupported when I try to delete or resize it.

I ran fdisk but it doesn't see the Linux partitions either, so I can't delete them in that program. I finally tried to format the disk but now I have a 9 gig drive with nothing on it. How do I get those Linux partitions off the drive so I will have a 160 gig drive that I can start over with? I've spent 6 days this week reinstalling XP and all of my programs, and now everything is gone because Ubuntu decided to be a disk hog.

View 4 Replies View Related

Ubuntu :: File Sharing Filling The Gaps?

Feb 10, 2010

I am relatively new to ubuntu/linux and although I have made some good progress on my server I'm struggling with a few points. I am sure what I'm about to ask has been covered in some other thread/guide but I just cant pick out the missing piece hence my direct question;I have 2 computers; a server and mediacenter.on the server I have installed nfs:

Code:
sudo apt-get install nfs-kernel-server nfs-common portmap
then

[code]....

View 5 Replies View Related

Programming :: Shell Script To Automatically Delete Files With The Same Name As The Parent Directory?

Mar 18, 2010

I am facing a problem in Windows due to a virus called Newfolder.exe which creats files with the same name as it's parent directory and an extension .exe and this happens for every directory in the entire hierarchy in the infected pen drive. The antivirus detects them, but is sucking slow. So I thought this is a good opportunity to use the concepts of the all mighty shell script to remove those as they follow the same pattern. Say my complete path is

Code:

/home/pkd/fol1/

The virus would have created an file with complete paths

Quote:

/home/pkd/fol1.exe

If fol1 has two more directories fol11 and fol12 Then there would be two more .exe(virus created) in the following path

Quote:

/home/pkd/fol11/fol11.exe
/home/pkd/fol12/fol12.exe

View 1 Replies View Related

Fedora Servers :: Cannot Delete Directory 'foo': File Exists

Jan 17, 2009

I was transferring some files from my laptop (running FC6) to a server at my work (don't know what kind) with "scp -rpC" and it stalled, don't know why.
Now when I try to delete the files from the server so I can start again I get the following error message

Code:
rm -r Single_injections/
rm: cannot remove directory `Single_injections/195320/400mA/010': File exists
rm: cannot remove directory `Single_injections/195320/400mA': File exists
rm: cannot remove directory `Single_injections/195320': File exists
rm: cannot remove directory `Single_injections': File exists

[Code].....

View 6 Replies View Related

General :: Delete Oldest Directory And File Using Ncftp Commands?

Aug 17, 2010

i use ncftp for some bash script action. how to delete oldest directory and oldest file using ncftp commands?

View 3 Replies View Related

CentOS 5 :: Command To Delete The Oldest File In A Folder/directory?

Oct 13, 2009

I am trying to add a command to my backup script to delete the oldest file in the destination folder before adding a new .tar.gz file.I found this information at .html which I thought would work fine and added the following line to my backup script:ls -t -r -l /backups/Scalix_Backup* | head --lines 1 | xargs rmHowever when I tried this I get an error:rm: invalid option -- wTry `rm --help' for more information

View 7 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

Ubuntu :: Delete Notepad For Every File In The System?

Jun 20, 2010

I installed wine and now i get the option to open some files with notepad. I know I can delete this entry when I go to the properties of a document and delete it in the tab "open witth". Is there a way to delete notepad for every file in the system?

View 4 Replies View Related

Ubuntu :: Delete Files From Another File System?

Oct 24, 2010

When I boot up my Ubuntu system I get the following error message:Install Problem The configuration defaults for Gnome Power Management have been installed incorrectlyI found the following posting and this describes what also happesystemhttps://answers.launchpad.net/ubuntu...uestion/111256I've created a recovery disk by using a memory stick from which I can boot. I can mount the old filesystem (HD). When I navigate, with the file browser, into one of the folder on the the HD and try to delete messages I get the following error message - 'Error removing file: Permission denied'.I guess I need to log / tell those files the root password from the system installation as per the version on the HD. But how do I do this?

View 2 Replies View Related

General :: Unable To Mount A Pen Drive (which Is Formatted In Ext2 Format) With Directory Permission?

Mar 27, 2010

i am not able to mount a pen drive (which is formatted in ext2 format) with directory permission drwxrwxrwx and file permission as -rw-rw-rw.

View 3 Replies View Related

Programming :: Gawk - Delete Line In File?

Oct 13, 2010

I want to delete lines which contain the word "Fehler" but for some reason my programm isn't working:

Code: BEGIN { FS="|"
OFS="|"
SUBSEP="|"

[code]...

View 6 Replies View Related

Programming :: Bash - Delete Only One Line From A File?

Apr 9, 2011

I would like to delete a single line from a file that contains many lines passing through the same values ​​as the two parameters. Again, I would like to delete a single line and not all those that contain parameters. How can I make bash?

View 14 Replies View Related

Programming :: Delete Particular Revision Of File From SVN Repos ?

Dec 23, 2010

I am using Subversion version1.2 and need one favour. I have written code to delete particular revision from SVN Repository. Unfortunately, i couldn't delete particular version from repository. Any one can response me.. how to delete?

View 6 Replies View Related

Programming :: Delete A Line From File Using Shell Script?

Oct 16, 2010

i have a file containing contents as

1 2 3
2 2 3
11 2 3

now i want to delete the line which first column content is 1. so, if i pass the parametere 1 to function delete_row. is should remove the first row as

2 2 3
11 2 3

and then write the contents in file.

View 2 Replies View Related

Programming :: Delete Line In File Matching String?

Jan 26, 2010

Quote:Originally Posted by topcatI would like to know how i can write a shell script to delete a line if a particular pattern exists?E.g. I have a text file with multiple lines. Say 1000s. in the following pattern.

username@email.com:149.0.3.4:1
username1@email.com:149.0.3.4:1
username1@email.net:149.0.3.4:1
username1@email.edu:149.0.3.4:1

If the patternusername@email.com exists then the line "username@email.com:149.0.3.4:1 should be deleted from the file.I have a very similar question but I need to delete one line in a file which matches one very precise instance of a string only. Let's assume I have a file composed of thousands of lines and let's call the file chap-secrets. Let's take the following sample entries:

Code:
#USERNAME SERVER PASSWORD IP
pp pptpd blahblah *

[code]....

View 7 Replies View Related

Programming :: Delete Multiple Lines In A File Using Perl?

Apr 15, 2011

I have a file looks like the following:

digraph topology
{
"192.168.3.254" -> "10.1.1.11"[label="1.000", style=solid];
"192.168.3.254" -> "10.1.1.12"[label="1.000", style=solid];

[code]...

Order of these lines are random... So I cannot delete line #19, for example... And you can see that top four lines I want to delete are pairs. So there might be some clever way to detect the lines, if a line has both "1.9" and "1.11", then delete the line... I am new to perl language. The following is the code I have now... I think I just need to write some code inside the while loop checking if I want to delete the line $dotline before I write to a NEW file.

Code:

#!/usr/bin/perl -w
$TOPPATH = "/tmp";
$NAME = "topology";
$FILENAME = "$TOPPATH/$NAME.dot";

[code]....

View 16 Replies View Related

Programming :: Search For A Word In A File And Then Comment It Or Delete It?

Aug 9, 2009

I want to know that how can i search for a word in a file and then comment it or delete it. I know this command works.

sed 's/word/#word/'g inputfile > outputfile

But the lines in my input file are as under:

zone "abc.com" { ---- This line can be comment
type master; ----- This line repeat again and again in the file
file "abc.txt";
allow-query { any; }; -This line repeat again and again in the file
};

I want to know how can i comment a certain zone.

View 8 Replies View Related

Programming :: Sed/awk: Three Consecutive Blank Lines In A File - How To Delete Two Of Them

Jun 16, 2010

I have a file with three consecutive blank lines. I want to delete two and keep one.Also, if anyone could direct me towards a guide on regular expressions particularly as they apply to sed, I would be grateful. I am having a hell of a time figuring out the syntax.

View 8 Replies View Related

Programming :: Shell Script To Delete File If It Exists

Aug 10, 2010

I am writing a shell script to delete a file if it exists.

View 11 Replies View Related

Fedora :: Xfce Icon - Delete / Remove File System?

Mar 17, 2011

I am using F14 Xfce and i have installed awn so i do not need my desktop icons anymore, ie home,bin and file system, is there any way to delete/remove them? i have installed gconf-editor and unchecked them in apps-->nautilus-->desktop, but they are still there?

View 2 Replies View Related

Ubuntu Security :: Delete Files Off Journaling File-system?

Feb 19, 2010

I have some very confidental files on my computer that I store such as credit reports, and other things. I always encrypt them with GPG, but there still is that original non-encrypted file left that needs to be deleted. I looked into tools like wipe, and shred but they all say that it really doesn't help on journaling filesystems directly on their man page.

I am not asking how to wipe the whole drive with dd or anything, but I am simply asking if there is a tool that'll delete a single file securely.

View 9 Replies View Related

Ubuntu :: Change Or Delete Obsolete System File Type

May 23, 2010

I use Markdown to store all of my source documents. Unfortunately, the .md extension maps to application/x-genesis-rom under Ubuntu. I'm not sure why that would be a system default MIME type, but I'd like to change it.

I've tried using:

Code:
gksu assogiate

to modify my file type cache. Unfortunately, even as the SU, I can't modify the entry for this file type. The "Remove" button is inactivated for the entry. (See attachment.)

How can I get rid of this (obsolete?) file association? Alternatively, how can I make my new one (text/x-markdown) take precedence?

View 5 Replies View Related

Software :: VFat File System - No Permissions To Delete Files

Feb 21, 2010

I have the cowon iAudio7 music player with vfat file system and increasingly running into permission problems when I try to delete files. Unsurprisingly I am now running out of space. I am figuring if I could somehow mount it onto a folder in my home partition I will have full permissions. The problem is the drives name which is exactly with space: So even if try to delete files in the terminal I don't know how to cd into:

Code:
/media/I AUDIO7
note the space between I & AUDIO7.

View 14 Replies View Related







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