Programming :: Way To Make Proc Filesystem Writable?

Jul 22, 2010

is there a way to make the /proc filesystem writeable? With aufs or unionfs i can't join the /proc filesystem with a writable directory directly. But i think it should work by using one of this file systems.If i try to join two dirs write-proc and virtual-proc Code: mount -v -t aufs -o dirs=/tmp/write-proc/:/tmp/virtual-proc/ none /tmp/joined-proc/ and afterwards make a bind mount /proc to virtual-proc Code: mount --bind /proc /tmp/virtual-proc/ i can't see any change in /tmp/joined-proc.

View 2 Replies


ADVERTISEMENT

Programming :: C Library Or Some Functions To Read Proc Filesystem

Dec 6, 2010

I have a requirement, to read the complete proc filesystem from the linux pc.. Does linux provide some functions to read the proc filesystem means the directories and files present in the filesystem.. in short I want to create a treeview of proc filesystem. and if a user selects the file in the proc.. I should show the contents in the respective file. So I want some library or functions to read the proc filesystem..

View 1 Replies View Related

Programming :: Parse /proc Filesystem "files" For Results?

Dec 1, 2010

Im reading in file /proc/cpuinfo into a char array.Im using strstr to search for a string im interested in (the cpu speed line) and storing it in another char array.I want to just store the line that contains CPU speed but im getting everything after the CPU speed line in the char array too.Is there anything better than strstr or is there someway i can parse the the payload data (i.e. the actual cpu speed)

View 4 Replies View Related

Programming :: Bash - Ps - Psgrep And Read /proc/$pid Make Script Exit

Mar 22, 2011

I have not been able to write bash to use a PID file to ensure no other instance of the same script is running! All three methods I can think of to see if the PID in the PID file is another instance of the script make the script exit with a return code of 1 but the same commands run at the command prompt work as expected.

The first attempt was:

Code:

The first attempted workaround was:

Code:

The second attempted workaround (with debug to make the following command prompt copy and paste meaningful) was:

Code:

Here's the command prompt session, testing with a stale PID file and then manually running the problem command and it behaving as expected:

Code:

This on Slackware64 13.1 which has bash 4.1.7.

In desperation I tried rebooting but the behaviour was the same.

View 2 Replies View Related

Ubuntu Servers :: Proc Folder Is Filling Up Filesystem?

Mar 1, 2010

My filesystem is almost full and the problem is in the proc folder.What does that folder contain and can I delete something from it?

View 1 Replies View Related

General :: How To Make Partition Which Is In Ext-2 Writable Disk

Apr 13, 2010

i have debian system in which i have mounted the OS on a ext-3 system . I have got a partition of 60 gb , which is formatted to ext-2 partition . Even if I mount , i cant write anything into it . How can i change that ? How can I make the disk writable?

View 2 Replies View Related

Ubuntu :: How To Make OPT Android Writable By Eclipse

Jan 16, 2011

I've installed eclipse and android manually at /opt. How do I make /opt/android writable by eclipse ? I don't want to chmod it to 777. Specifically I need to know the group eclipse belongs to.

View 3 Replies View Related

General :: Make A Writable Direcotry In Based Hosting?

Aug 5, 2010

am having following error while installing TimeTrex payrollable Cache Directory: Warning: Not writable (/hrm/cache) Writable Storage Directory:arning: Not writable (/hrm/storage) Writable Log Directory: Warning: Not writable (/hrm/log) I did apply permission settings: i.e777 on cpanel.but invain.i got info. abt .htaccess files from where we can apply write attributes to the directory. (not getting how to apply on a linux based hosting)

View 1 Replies View Related

OpenSUSE :: Make Files On CD Writable When Copying To Hard Disk

Jan 3, 2011

I've set up my parents' machine running KDE 4.5 and want them to use the Gwenview import function from the Device Manager popup when transferring image files off photo CDs or other inserted media, since it's the easiest method for them to comprehend. All the files on their photo discs are r-xr-xr-x by default so they're unable to rotate or modify the images once copied to their hard disk. I want to set one specific images folder on their system to automatically force any files placed there to be rw-r--r-- (and rw-rw-r-- for another shared images directory elsewhere). It seems that umask won't work since that can only take permissions away and not add them, and I'd rather avoid getting into messy ACL configuration. Is there a way to achieve this either generically or some hidden config in Gwenview itself? I use KRename myself for such tasks but this is way too complex for my parents to understand so I need something that works without them having to do anything.

View 9 Replies View Related

OpenSUSE Install :: Forgot To Make Windows Partition (Writable)

Jul 28, 2010

Somewhere during my installation, I forgot to make my Windows partition (as well as a drive that linux associates with Windows) writable. Is there any way to make them writable, without re-installing everything?

View 9 Replies View Related

Fedora Installation :: An Error Occurred Mounting Device Proc As /proc: Mount Failed

Jul 6, 2010

I've got the F13 LiveCD that I was able to boot and use using the "nomodeset" boot option. From the desktop I'm trying to perform an Install to Hard Drive. I've read the Install from LiveCD post regarding the creation of a /boot partition and a / root partition. I've tried creating them without the LVM group and with. But every time I appempt to install I get...

An error occurred mounting device proc as /proc: mount failed: (9, None). This is a fatal error and the install cannot continue.

Hardware is a Sager 8887 (P4, 3.06HT, 60GB HDD, Radeon 9000 graphics adapter)

View 7 Replies View Related

General :: Copy A Read-Only File And Make The Copy Writable With A Single Cp Command?

Mar 1, 2011

How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).

More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.

View 1 Replies View Related

Fedora :: How To Make Drives Readable / Writable In Fedora 14?

Dec 29, 2010

I decided I could get by without WIN7 on my computer on a permanent basis, so re-installed Fedora 14 on drive SDA (Drive 0), previously occupied by WIN7, and formatted all other drives in the system (SDB, SDC, and SDD to EXT4.The install went well, and everything is working except one thing - I cannot get SDB,SDC or SDD to copy files one to the other. The message I get is that permissions do not allow this process. The automount works OK, and I can access the contents of individual files on these drives, but as far as copying goes, there is no go.What other parameters do I have to add to the automount in /etc/fstab to allow for this read/write function, or am I looking in the wrong area entirely?I have searched these forums and the Internet in general, but I cant seem to find anything specific to this problem.

View 9 Replies View Related

Programming :: Write The Value To The Proc Entry In The Program?

May 1, 2011

I have a kernel module program which is used to create a entry in the proc file system. I have to read and write values in the entry. Its taken from a online tutorial stuff.how to write the value to the proc entry in the program ?

View 1 Replies View Related

Programming :: C Code Fails On Repeatedly Opening /proc?

Jan 16, 2010

I am trying to run my code repeatedly in a loop about 50 times for timing measurement. I have C code running on ubuntu 8 on a single processor, Intel x86. My code is something like this

Code:
for (loop =0;loop<=50;loop++)
{
// other operations
pDir = opendir("/proc");
while (pDir == NULL)

[Code]...

After about 28-29 times the loop stops executing. I initially had a return -1 if I got pDir == NULL. That caused my program to exit, and I dont want that. Any clues on why this happens, and how I can circumvent this?

View 1 Replies View Related

Programming :: Check The Presence Of USB Using /proc Interface In A C Program

Feb 22, 2010

I want to check whether a USB is plugged in its slot from a C program. I want to make use of /proc interface for the same. During my reading i found that /proc/bus/usb/devices will tell how many USB devices are currently present.

So whether i can open this file and use stat call to identify whether the size is 0. If size is 0, i can assume no USB present. Else i can assume USB is present.

Whether my understanding correct. If USB inserted, how can i check the folders present in the USB stick.

View 2 Replies View Related

Programming :: Retrieve A Single String Or Value From /proc/cpuinfo

Oct 1, 2010

I'm trying to retrieve a single string or value from /proc/cpuinfo, but when I try to extract the model (not the model name) the model name comes with it, also it likes to print it twice...

Code:
model="`cat /proc/cpuinfo | grep model | cut -d: -f2 | cut -c1-3`"
echo $model

All i want this to do is spit out the model number once. (I need to pass it to another script)

View 14 Replies View Related

Programming :: Read Time Of /proc/net/tcp6 File

Dec 8, 2010

I am trying to read the /proc/net/tcp6 file of a huge server (chat server) for monitoring the tcp6 connection states.

My server's tcp6 file has more than 26000 lines. For monitoring the server connections, my monitoring tool has to read the /proc/net/tcp6 file quickly in a regular interval (5 secs) and process. Presently it takes minimum 6-7 seconds for reading the whole file.

My tool can able to read the normal file (26,000 lines) less than 1 second, but it is not possible to read the same size of proc file.

I have 2 questions:

1) Why proc file takes more read time than normal file?

2) Is there any way to read the /proc/net/tcp6 file more quickly?

View 2 Replies View Related

General :: Make All Filehandles On That Filesystem Invalid?

Aug 12, 2010

How to unmount a filesystem in Linux without investigating why is it busy? I want to do it in one command. It should handle applications using that filesystem, submounts, containers (lxc-execute -n qqq <command>) and all other things.

Just "unmount. No objections!". Special kernel patches or configuration is allowed. Filesystem should be really unmounted, so umount -l is certainly not an option. For example, for cryptsetup remove (BTW how to forcibly cryptsetup remove? Update: cryptsetup luksSuspend, but you won't be able to cryptsetup luksResume if it is not LUKS). How to make all filehandles on that filesystem invalid?

The only reliable way I know is mounting the filesystem through the FUSE (there is usually no problem to unmount FUSE thing because of I can just kill it's process). P.S. Already know mount fuser, lsof | grep, cat /proc/*/mounts | grep and obsolete non-working "badfs patch".

View 3 Replies View Related

Ubuntu :: Changing Filesystem - Using Partimage To Make Copy Of Data

Feb 22, 2010

I have my / partition on an SSD that I formatted in ext3 but I now realise that, in order to use TRIM, I need to be ext4. Can I use Partimage to make and image of the partition, format it (using GParted) and then restore the image? Basically, do Partimage files survive a filesystem change?

View 1 Replies View Related

Red Hat / Fedora :: Filesystem Check After Power Outage - WARNING: "Running E2fsck On A Mounted Filesystem May Cause SEVERE Filesystem Damage"

May 18, 2011

I am very new to linux, and I have a question regarding the filesystem check (fsck). The power recently went out and when I tried to restart linux the following error appears:

*/dev/sda1 contains file system w/errors, check forced it then goes on to say..

*An error occured during the file system check. Dropping you to a shell; the system will reboot when you leave the shell. Give root password for maintenance (or type Control-D to continue) I wasn't sure what to do, but checked some other online forums and they suggested running fsck manually - so I typed in the root password - and used the command, "fsck -A -V ; echo == $? ==" it then gave the following message

*WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage
*Would you like to continue (y/n)

Again, I wasn't sure what to do so i just checked no. I then manually turned off the computer and was prompted at the beginning to press Alt-3. I was brought to another screen and it informed me one of the drives was degraded and suggested rebuilding the array. I tried doing this, but it still brings me back to the original error of, "/dev/sda1 contains file system w/errors, check forced," and the process continues.

Also, when I tried to rebuild the array, I didn't backup any of the data on our home directory before doing this (which was probably a big mistake). After being prompted to type the root password, I was able to give the ls command and look at all the directories...the home directory where our data was stored was empty and I am afraid I may have lost some information. Is there a possibility that data was lost when I was trying to rebuild using the old drives?

View 2 Replies View Related

Programming :: Makefile - Error When Run The Make Run - No Rule To Make Target - Shell.h

Sep 15, 2010

I want to gave much details as possible. working directory (~/a1/shell) in the shell directory i have Makefile. also in the shell directory i have subdirectory's (obj, src, include)

My current Makefile

Quote:

#What needs to be built to make all files and dependencies

clean:

# End of Makefile

I wanted it so: all .o files are created in the obj subdirectory, and my application, sshell, is created in the shell directory.

I am getting this error when i run the make run: No rule to make target 'shell.h', needed by 'shutil.o'. stop

View 1 Replies View Related

Programming :: Filesystem Formatting In C?

Apr 5, 2011

I'd like to know if it's possible in my program (C/C++) to create a filesystem on a partition, maybe with advanced options too. I don't want to call the shell and execute the usual commands to do that, so I wonder if there are some native Linux syscalls or external libraries to do that.

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

Server :: Can't Mount NFS As Writable

Jan 21, 2011

This is my first time working with NFS but I fail to see what the issue is since everything works properly.

View 13 Replies View Related

Slackware :: How Mount Dvd As Writable

Jul 18, 2011

If I put a blank dvd in the drive it will not mount automatically on my slackware 13.1So I ran "mount" to list the mounted file-systems, put a burned dvd in the drive and waited for it to mount automatically. Then I ran "mount" again. The only added line was

Code:
/dev/sr0 on /media/Disc type udf (ro,nosuid,nodev,uhelper=hal,uid=1000)
so I figured /dev/sr0 is the dvd drive. I put the blank dvd back in the drive and ran the following

[code]....

View 2 Replies View Related

Ubuntu :: How To Format / Wipe Re-writable CD For Further Use

Jan 27, 2011

"How can I format/wipe a rewritable cd for further use in ubuntu 8.04"?

View 5 Replies View Related

Slackware :: GCC 4.3.3 In 13 Opens Gcda As Writable?

Jan 27, 2010

In the stock GCC 4.3.3 included with Slackware 13.0, there has been some reported errata with GCC opening GCDA and GCNO files in write mode. This can cause errors indicating that it was unable to open files during building.

View 5 Replies View Related

OpenSUSE Install :: Unknown Filesystem Type 'reiserfs' Could Not Mount Root Filesystem - Exiting To /bin/sh

Mar 27, 2010

When I try to boot to OpenSUSE I get the following error during boot-up: unknown filesystem type 'reiserfs' could not mount root filesystem - exiting to /bin/sh$

This only started happening quite recently - before this I could boot to Linux quite happily.

View 6 Replies View Related

General :: Detect Filesystem Type (can't Mount Filesystem Image .img)

Mar 11, 2011

I am trying to mount a file image, like this

mount -o loop /tmp/apps.img /media/apps

But I get the following:

mount: you must specify the filesystem type

I try ext3:

mount -o loop /tmp/apps.img /media/apps -t ext3

dmesg says:

error: can't find ext3 filesystem on dev loop6.

I've also tried ext2, vfat etc. How can I detect the filesystem type of apps.img?

View 2 Replies View Related







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