General :: Find Inode Of A Particular File Using Its Number?
Nov 16, 2010
Can we find the inode of a particular file using its inode number?
The reason is i want to know how many blocks are occupied by specific file.
if we consider block size of 1K.
if the file size is of 100 bytes. In such a case, when the file is
stored on disk, the file will occupy 100 bytes or 1K (since we have
choosen block size to be 1K) ?
View 6 Replies
ADVERTISEMENT
May 19, 2010
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.
What is the command for this?
View 4 Replies
View Related
Jan 3, 2010
How can i recover a file if i don't know the inode number of it? Is there a way of scanning the hard drive for inodes that has no reference?
View 1 Replies
View Related
Dec 16, 2009
I am getting this error every night at 4am (right about when the cron.daily runs). when it does this, it remounts the filesystem read only. In the AM I get yelled at by users. all it takes is an fsck to fix the problem, but it does it every night. I have tried to rebuild the journal by removing the has_journal flag, running an fsck, and then re-adding the journal... same problem.. and its always the same inode.
View 2 Replies
View Related
Aug 19, 2010
anyone know that the ntfs's file sytem struct? is there's a API or something other could let me get this number? Or there is actually no such number in windows like the number of inode in linux?
View 1 Replies
View Related
Jun 3, 2010
i have a slave disk with some data formatted in ext4 , now i have 95 % of inode used ( and 50% of used space )how can increase inode ?
View 5 Replies
View Related
Nov 2, 2010
how can we view a file with its inode nno . eg. cat 12456 where 12345 is the inode of a file
View 3 Replies
View Related
Jan 28, 2011
I cant see the inode number of a file by running
ls -i <file>
How can i see the blocks where this inode points to? I'm talking about a yaffs2 partition.
View 3 Replies
View Related
Apr 27, 2011
I have tried burning a number of ISO's of 101.10 and 11.04 to DVD and intalling them on 2 of my desktop machines. I eventually see: ('initramfs) Unable to find a medium containing a live file system' The thought just occurred to me as I type this, perhaps I can only install from a CD and not a DVD?
View 9 Replies
View Related
Mar 25, 2010
I decided to take an old Gateway that I bought off a guy cheaply and turn it into a file and web server.I purchased copies of Debian 5.0.4 i386 disks (31 in all) on the advice of a friend, the disks weren't expensive, but now that Ive installed all the disks, I'm having a variety of errors
[443.110940 end request: I/O error, dev hde, sector 76021855
[443.111074] EXT3-fs error (device hde1): ext3_get_inode_loc: unable to read inode block - inode=2375715, block=9502724
INIT: cannot execute "/sbin/getty"
[Code]..
View 2 Replies
View Related
Aug 29, 2010
I am playing with grub and i change the root using:
How can i know what's x for /dev/sda7 ?
The problem is that in Gparted view, the order is not like sda5, sda6, sda7, ...but the order is like:
So what's x for /dev/sda7 ?
View 2 Replies
View Related
Feb 22, 2010
i need to know how to find number of files in a directory? is there any system calls in fedora 12.And i need to know how to perform a operation if the that count increases by one?
View 14 Replies
View Related
Jun 22, 2010
I have a file called abc.txt which has following contents.
10.180.8.231=31608
10.180.8.232=29011
10.180.8.233=31606
[code]....
View 3 Replies
View Related
Mar 30, 2010
I can track that my CentOS 5 ships with SVGA driver through:
cat /var/log/Xorg.0.log | grep SVGA
But how can I find the SVGA Version number?
View 1 Replies
View Related
Aug 16, 2010
how to find the driver module name using MAJOR NUMBER. In general major number list is available in Documentation/devices.txt but if i want to find out the driver module name specific for a given MAJOR NUMBER, what can be done?
View 2 Replies
View Related
May 16, 2010
During the installation of RHEL it asks that you may enter the installation number to get packages , updates .....etc, now my server is up and running and i need to get the number that I added during installation
View 2 Replies
View Related
Apr 7, 2010
I need to find TCSH shell and gzip version number by running a acript on several boxes through ssh. How can i do that? I made a script for tcsh but it is not working by ssh , it only works on my box . I dont know from where to find the gzip version info.
View 5 Replies
View Related
Aug 13, 2010
Does anyone know how to get the path with a inode number by C programming?
Or can I get the absolute path without giving a "path" but a inode number by C?
like this: get_path(unsigned inode);
not such this function: getcwd(".", xxx);
taowuwen@gmail.com
View 7 Replies
View Related
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
Aug 14, 2010
where I can to find mapping between man section number and it's description in standalone mashine.In other words, where I can to find description of some man section when I have not connection to Internet? For example:
1 -> User commands
2, 3 -> Linux programmer's manual
and so on..
View 1 Replies
View Related
Dec 13, 2010
What offline method is there of finding out days since a certain date. Example: How would someone find the number of days from 1-Jan-2003 to 7-Dec-2010? Could someone write a script that takes in the 2 dates and output the number of days?
View 5 Replies
View Related
Jul 12, 2010
I read this thread but
Code:
anisha@linux-uitj:~> su
Password:
[code]...
View 14 Replies
View Related
Aug 8, 2010
I was wondering if it was possible to display inodes of deleted files using a command. If yes, is it possible to recover the deleted files from their inodes?
View 1 Replies
View Related
Jul 9, 2010
I was using gparted from a live usb to resize an ext4 partition and it failed while running resize2fs. The error it gave was
Code:
resize2fs: The inode is from a bad block in the inode table while trying to resize /dev/sda5
please run 'e2fsck -fy /dev/sda5' to fix the filesystem after the aborted resize operation.
[code]...
View 1 Replies
View Related
May 19, 2011
Anyone, I would like to ask if it was possible to change the entries of a file's inode table ?
For example
Code...
I was wondering if I can change the entries in this inode table's entries.
For example I want to change the "Modify" entry ? I want it to reflect to day 2009-05-19 for example.
Can i do it ?
View 13 Replies
View Related
Mar 24, 2010
I need to get the max number from the name of a file
Formant of the file name:
[a-zA-Z]*_[0-9][0-9]_[A-Z][A-Z].log
Delimiter as underscore '_'
[code]....
known part in the above file name will be GA.log A give directory may or may not contain files in the above format or may contain file other then the above format if so then ignore it.
Eg:-
1) Directory=/tmp/log having below listed files
ant_01_EG.log ant_02_GA.log ant_04_EG.log cvs_01_EG.log cvs_02_GA.log cvs_04_EG.log master_01_GA.log master_03_EG.log master_04_GA.log
[code]....
output=> 06
2) Directory=/tmp/log no files
cmd=> ls *[0-9][0-9]_GA.log 2> /dev/null | awk -F_ '{ print $2}' | sort -nr | head -n1 | awk 'BEGIN { if ($1 >0 ) x=0; else x=1 } END {printf "%02.0f
", $1+1}'
output=> 01
if there are no files the output should be 01 and if file(s) found the output should be next highest number+1, In the above example it is 06 My cmd is bit lenghty. reduce my cmd and it should be in one line.
View 6 Replies
View Related
Apr 7, 2010
I am running centos 5 on adaptec 2405 raid 10
PHP Code:
I get this error:
[code]....
View 9 Replies
View Related
Nov 9, 2010
I'm currently trying to design a small, simple enough shell program for area codes. I have a list of area codes in a database, and I am trying to write a program that will have a user input an area code, and then have the program print out information that immediately follows that area code in my database. I assume I need to use a find or locate command, but I'm not sure if I should be searching for a string or the number itself. The number could possibly occur at some other point in the file, though the way I have the file set up it only occurs once at the newline.
what function I should use and how I should go about it? As is I only have the absolute bare-bones beginning of having an echo for the prompt to input an area-code, and the read once it's input. Without the find I'm not sure how much farther I can get. Also, would it make it easier if I added some character such as a ! to the end of the number at the newline to make it easier to search for? With a macro that would be easy enough to do.
View 1 Replies
View Related
Jul 26, 2011
I'm trying to write a script that takes two arguments, the first argument is a number, and the second argument is a filename. The shell script should indicate if the file's size is BIGGER or SMALLER the number provided. this is what i have sofar, am i on the write track, i'm hoping its just a problem with my if command
if [ $1 -h $2 ]
then
echo "$1 is bigger than $2"
else
[code]....
View 2 Replies
View Related
Mar 4, 2010
I wanted to grep the line in a file starts with -1.000000e+00.
Tried grep "-1.000000e+00" *, got error "grep: invalid option --".
Neither of the following works:
grep "-1.000000e00" *
grep "1.000000e00" *
How do I grep a negative number with scientific notation?
View 3 Replies
View Related