Ubuntu :: Traverse A Directory From Kernel Space?
Apr 24, 2010
how can I traverse a directory from Kernel space? I'm using the path_lookup function. However, through the inodes I get with this functions I can only access those files that have been displayed at some point by another process (doing ls from the terminal for example)
View 7 Replies
ADVERTISEMENT
Jun 30, 2011
I'm trying to create a script that when given a diretory, it goes traverses through all the subdirectories and process the files in them.However, there is one restriction.directories thatit traverses through must all have a read permission for the others group.How would I go about doing this?
View 1 Replies
View Related
Aug 27, 2010
I can't get sed to actually change the file, clearly there's something basic not working, can anyone point me in the right direction? I know nothing about scripting. Oh yeah, all the directories have spaces which was why so elaborated.
find . -name "*epub" | while read file; do unzip -o "$file" content.opf && mv content.opf content.opf.bak && sed 's/<dc:language>UND</dc:language>/<dc:language xsi:type="dcterms:RFC4646">EN</dc:language>/' < content.opf.bak > content.opf && zip "$file" content.opf && rm -f content.* ; done
View 2 Replies
View Related
Jan 4, 2010
Logical Memory Space of 4GB is divided in to 3GB User Space and 1GB Kernel Space. Always. Correct?
1. How can we change it? (just changing value of PAGE_OFFSET is okay?)
2. If system have only 256MB of memory (embedded system) and suppose Kernel Modules eat away all the memory during boot. User space will be left will no memory. Is this case possible?
View 2 Replies
View Related
Dec 13, 2010
I am developing a I2C CDROM client driver. The CDROM firmware supports TOC information read through a I2C command. It sends the TOC information in burst ( Interrupts a GPIO pin when it is ready ) and my CPU does a I2C read to read the TOC. When the CDROM firmware finishes sending the last data burst , it informs my CPU that it is done with the TOC, by a flag in the last data burst. I would like to know, which is the most efficinet way I can send these TOC information to userspace?
View 4 Replies
View Related
Sep 22, 2009
I am writing device driver in which i have to call callback function from kernel space, which are saving my data. But the callback functions are in userspace. While accessing them i am getting segmentation fault.
View 1 Replies
View Related
Jul 7, 2009
I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.
But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..
Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.
View 2 Replies
View Related
Jul 14, 2009
How to use execv from kernel space to call a user space program writtenfor socket prog.
I tried to write code for socket in kernel but its not working.
Socket code in kernel is also needed.
View 2 Replies
View Related
Jul 21, 2011
I have the following requirement in my module. The driver gets some data from the external device. After getting 1MB of data it has to send it to the user space application. What is the best thing to implement for this in driver.? Is it ok to implement like, after getting data, the driver will send a signal to the user space application. Then the user space application sends an ioctl to read the data. Is there any alternate, that the driver directly sends the data without the user space application asks for it.?
View 4 Replies
View Related
Nov 28, 2010
measure kernel space time and user space time?
View 1 Replies
View Related
Jul 12, 2011
I have a xml file and I read it within a php file with XML dom. This is the node structure of my xml file :
<Root><name></name>
<surname></surname>
<ID></ID>
<department></department>
[code]....
In the comment line, I've got the parent node of the current node. Parent node is "User" node. I would like to obtain the children of this parent node, say "name","surname " etc. How can I do this? Is there any function such as : "$parent_nodes->bringChildren('name')".
View 1 Replies
View Related
May 15, 2011
I need your inputs on performing some operations:-
a. Traverse from top Level directory, find all the directories
b. Rename all these directories to <original name>.dir
c. Once the renaming is done - search from top level and retain only those directories which has .txt content in them.
d. Delete rest all.....
Can i use xargs here to perform operation a and b , or will sed will be useful.
View 14 Replies
View Related
Aug 16, 2010
I installed Ubuntu for a new server for a while (about one month long), then I logged in for configurations everyday. Today after I logged in system showed
Code:
Usage of /: 93.8% of 35.76 GB
so I used df -hl for query detail and system showed
Code:
Filesystem Size Used Avail Used% Mounted on
/home/myuser/.Private 36G 34G 501M 99% /home/myuser
What happen with my server, Virus or not? Why that directory is so big? Is there necessary files? Can I resolve and how to do it?
View 1 Replies
View Related
Jan 6, 2010
Since this is my first post, before i describe my problem, i'd like to say regrats to all of you for maintaining here such a good support community.
So, here we go: I have a headless Debian box and i want to set it up as a small office router/gateway. On the box i installed a regular NIC and a Viking Traverse ADSL+ Card which gets recognised by the OS as an 8139 ethernet card and has an embedded ADSL+ modem. The modem is accesible through the PHY interface once it gets assigned an IP. Having said that here is the actual setup:
eth0 : Viking Card
eth1 : NIC (this NIC is connected to a switch)
eth0 : 192.168.1.2 (internal modem is on 192.168.1.1)
eth1 : 192.168.1.3
/etc/network/interfaces
[Code]...
View 1 Replies
View Related
Jun 16, 2010
I am trying to learn assembly using nasm as assembler. I did not found example related to string operation. I had following example code,
global asm_strlen
section .data
section .bss
section .text
[code].....
my problem is at highlighted line, I am not getting how to copy a byte into 4 byte reg. rather what is syntax of mov instruction to mov byte to WORD DWORD etc.
View 3 Replies
View Related
Aug 26, 2010
If I use cd command going to a directory which has a space in its name, such as I input cd Program Files to go to dirve_c/Program Files, it will show there isn't the Program Files directory.tell me which command I can use to go to this kind of directory.
View 6 Replies
View Related
Nov 25, 2010
I am using fedora 12. I got "no space in root directory" warning from the system. When I went through it, I found many of the space has been occupied by /var/log/httpd/error-log file. So I just deleted the file but when I check the space with "df -h" command. It shows 0% availability. The same problem occurred before but it solved when I restarted the system. But how to regain the space without restarting the system?
View 5 Replies
View Related
Jun 12, 2010
I have an external 800GB USB drive I used for storage for both files from Win XP and Suse 9.0.I can read and write my data from Win XP o.k but when I try to write any files from Suse side it gave me 'read only file system' . This drive from Unix is mounted in /media directory with root owner with executable and read only. When I changed to become root and issue chmod 777 'FreeAgent Drive'.I got error chmod: changing permissions of 'FreeAgent Drive':Read only file system.
From unix, reading any file on this drive, using gui application, I can not access the drive at all but I can see all files on the drive using a command with quote (cd /media/'FreeAgent Drive')
View 7 Replies
View Related
Nov 25, 2010
I am using fedora 12. i got "no space in root directory" warning from the system..when i went through it, i found many of the space has been occupied by /var/log/httpd/error-log file. so i just deleted the file..but when i check the space with "df -h" command.it shows 0% availability..the same problem occured before...but it solved when i restarted the system..but how to regain the space wihtout restarting the system?
View 7 Replies
View Related
Sep 23, 2010
i'm using c++ and Ubuntu and I need to write/copy some files to a directory chosen by the user of my system (the user can save it on any folder of any disk of the pc or other usb device). Before I do it, I need to know if there's space available on the disk. I cannot only check the result of write() function, the validation must be executed before I start to save or copy.
I was trying to use statvsf structure, but I only have the complete filepath (/home/lobinho/myDocs/), not the disk path. The statvfs() function only works with disk path (i.e. /media/KINGSTON ).
The source of my function:
Code:
int MyClass::availableSpace(string dst, ulong* availableSize) {
int result = ERROR;
try {
struct statvfs devData;
[Code]...
View 4 Replies
View Related
Aug 24, 2011
CentOS 5.4 (Final) is installed on my VPS.I'd uploaded a zip file that contains a directory and some files that there are space in their names and now I can't do anything with them.
I can't move them using mv command
I can't rename them
I can only re-compress or delete the folder
how I can rename or move them?
View 5 Replies
View Related
Jul 5, 2011
I am looking to create the Directory with an allocated space of 10gb
View 3 Replies
View Related
Sep 30, 2010
I have a Dell laptop which originally was strictly a Windows computer; with a LiveCD of PCLinuxOS, I partitioned the drive to make room for dual boot with Linux. Unfortunately, I gave the Root directory too much space, and Home not enough. Is it possible to move anything over to Root to give Home more room? I would get rid of Windows entirely, but for a couple of programs that have no Linux equivalent (at least that I've discovered so far).
View 2 Replies
View Related
Oct 15, 2010
I'm starting using Centos having a trouble.
I'm trying to execute the command:
Uum Update
Or other yum installation of samething
After a while I obtain always messages saying:
Insufficient space in download directory
So I understood is a problem with space.
I went to my shell and digited the command:
df -h
but it show there is plenty of space.
I also deleted a lot of space to make room, just to be sure, but nothing different happens. I'm attaching a screenshot to this post.
View 3 Replies
View Related
May 28, 2010
I've about 5.5GB of free space....whenever I try to compile the kernel my system runs out of space...says zero bytes remaining maybe I din't configure it that well I cant exactly figure out which drivers/modules I need in order to obtain a working kernel.
View 8 Replies
View Related
Nov 8, 2010
I'm trying to run preupgrade to upgrade to fedora 14 from fedora 12 and get a message saying there is not enough space in /boot/upgrade. I've found some instructions on how to make more room in the boot directory but I get an error near the last step as I have noted below:
Method 1: Free up space
First, try to remove any kernel packages not currently in use on your system. The kernel-prune.py script can be used to identify kernels that may be safely removed. If you choose to remove additional kernels, be prepared with installation media should you be unable to return to your previously installed system.
The installer will need approximately 26M of free space in /boot. Use the following command to determine the amount of free space in the /boot partition:
df -h /boot
To identify kernels that may be safely removed, run the following from a command line:
curl -O '[URL]'
chmod a+x kernel-prune.py
./kernel-prune.py
Now, to actually remove the kernel versions listed by the above command, run the following as root:
# PKGS=`./kernel-prune.py`
# echo $PKGS
# yum remove $PKGS
Next, adjust the number of reserved filesystem blocks using the command tune2fs. You'll first need to identify the block device for your /boot file system. In the example below, /dev/sda1 is the block device for the /boot filesystem.
# mount | grep "/boot"
/dev/sda1 on /boot type ext4 (rw)
I get this far and get the following Error:
[root@localhost ~]# mount | grep "/boot"
/dev/sda1 on /boot type ext3 (rw)
[root@localhost ~]# /dev/sda1 on /boot tupe ext3 (rw)
-bash: syntax error near unexpected token `('
[root@localhost ~]# mount | grep "/boot" /dev/sda1 on /boot/type ext3 (rw)
-bash: syntax error near unexpected token `('
[root@localhost ~]#
Now, adjust the number of reserved blocks for the /boot filesystem using the command tune2fs. Normally, a small amount of space on ext filesystem formatted partitions is 'reserved' and can only be used by the system administrator; this is to prevent an entirely full partition from rendering a system unbootable, and allow the administrator some space in which to work in order to clean up 'full' partitions. However, neither of this cases really applies to the /boot filesystem, so removing this reserved space is safe.
# tune2fs -r 0 /dev/sda1
View 1 Replies
View Related
Jul 10, 2010
I learned a little bit about this command (du) to find out how much space a directory takes up but what I want to know is can you tell it to exclude directories?For instance, I wanted to know how large the / directory is on my old suse10 drive but I want to exclude /home (/home was not a separate partition on that drive).
View 4 Replies
View Related
Mar 19, 2011
My machine telling me that my home directory is running out space,It is said 95% in usage.Try to delete the big unwanted files in users (just two user in my machine),df ing, but the home usage status keep on 95%.
View 9 Replies
View Related
Mar 16, 2010
After installing everything I neded to get on to the web with my server, I discovered that my www dir only has 20 gb.
How can I increase the the size of my directory?
View 6 Replies
View Related
May 5, 2010
I am using Redhat Linux 4 as I checked space and foud that / is 100% full. Like below:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 2316536 2179008 19852 100% /
/dev/hda2 101107 9324 86562 10% /boot
/dev/hda6 1683960 70256 1528160 5% /home
none 192012 0 192012 0% /dev/shm
How to create more space on / directory? or decrease size in / directory.
View 2 Replies
View Related