LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2006, 02:27 AM   #1
newbie_mel
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
values of bytes in regular files?


Hey.
I am unsure of the wording of this question.
Could someone reword it so I could understand it better?
what values can the bytes within each regular file have?
(i reworded it to make more sense, but i know there are different types of regular files, eg. text files, binary files.)... but i am unsure of the "bytes" thing.
 
Old 04-22-2006, 02:39 AM   #2
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
In hex : 20 to 7F and "\n".

In numeric : 32 to 127 and "\n".

By regular file I expect that you mean POTF (plain old text files) with readable charactes.

End
 
Old 04-22-2006, 02:41 AM   #3
newbie_mel
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Original Poster
Rep: Reputation: 0
I am new to Linux,
what exactly does:
In numeric : 32 to 127 and "\n"
mean?

(sorry i am very very new)
 
Old 04-22-2006, 08:25 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The question is still a bit unclear.

A byte is 8 bits, and can therefore have any value between 0 and 255 decimal (2^8-1)

In a text file, the byte values are assigned to characters. Here is a link to a table: http://www.lookuptables.com/

Note that some ascii values are control characters--ie they trigger some action on a terminal--as opposed to causing text to be printed.
 
Old 04-22-2006, 07:05 PM   #5
tamoneya
Member
 
Registered: Jan 2005
Location: MA
Distribution: Ubuntu 7.10
Posts: 558

Rep: Reputation: 31
/n was an example of an escape character. It means new line. so if i were to tell a program to print "hello /n world" it would look like this:
Code:
hello
world
other characters include // and /t
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding values of 2 files lluciano Programming 1 01-20-2006 02:57 PM
Can't create files bigger than 0 bytes GameboyHippo Linux - General 1 03-01-2005 08:04 PM
Samba truncating files to 0 bytes KimVette Linux - Networking 6 01-30-2005 06:42 PM
What are the right values for zone files. jolly Linux - General 0 05-06-2003 12:07 PM
bits and bytes and files basics question Bert Linux - Software 2 01-16-2003 08:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:10 PM.

Main Menu
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