LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Handling all file names safely in Bash

Posted 02-11-2012 at 12:09 PM by Nominal Animal
Updated 04-16-2012 at 02:41 AM by Nominal Animal (Fuller fixes.)
Tags bash, filename, nul

In Linux, each file or directory name (or more generally, pathname component) is just a string of bytes. It always ends with the C end-of-string mark, ASCII NUL: a zero. Value 47, ASCII /, is also reserved for use as a separator between pathnames.

Bash can read ASCII NUL separated data using read -d "" variable. It will, however, remove leading and trailing characters that match IFS, and return false (nonzero status) if the input does not have a final NUL. This applies to...
Senior Member
Posted in Uncategorized
Views 2253 Comments 0 Nominal Animal is offline
Old

Inode and its corresponding filename

Posted 07-21-2009 at 08:58 AM by Mr. ameya sathe (Tantra Yantra Swatantrya)

We refer to a file by its name. Computer refer to the file by its inode numbers. For every filesystem; there is an inode table. This table consists of Inode numbers & its correspondingmetadata. On the contrary; the mapping of filenames to inode numbers is stored in the directory containing the file.
To display the inode number of a file; say hindu one must issue the command
Code:
ls -i hindu
To display the total number of inode numbers in the filesystem ; you must issue the command...
Member
Views 7931 Comments 0 Mr. ameya sathe is offline

  



All times are GMT -5. The time now is 06:02 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration