473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to get the size of a particular file in bytes in unix using command?

I have used du and find command but it is giving the size of a file in blocks as I need the size in bytes.
Oct 13 '10 #1
2 5692
ashitpro
542 Expert 512MB
have you tried 'ls -l' command?
Oct 13 '10 #2
Nepomuk
3,112 Expert 2GB
Or check the du manpage and find that the option -b or --bytes will do the job.

Greetings,
Nepomuk
Oct 13 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Paul | last post by:
Hi, I'm using TikiWiki and was using its file upload feature, trying to upload a 2MB file. I get this error: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate...
3
by: dean | last post by:
Hello Group: Hopefully someone can answer my question. I have a unix shell command that I would like to emulate in python. I am sanning a file that contains a stream of data with a record size...
4
by: rkoida | last post by:
Hello evryone I am a newbie to python. I have a makefile which i can compile in UNIX/LINUX, But i I am planning to write a python script which actually does what my MAKEFILE does. The make file...
8
by: TonyHa | last post by:
Hello, Does any one have using Python to write a Unix "diff" command for Window? Tony Ha.
1
by: Marc Jennings | last post by:
Hi there, I have a problem in that I need to de-compress a file that was compressed using the UNIX compress command. The resulting filename is helloworld.xml.Z I have looked at SharpZipLib,...
5
by: Phil Jones | last post by:
Is there a way to determine the size (number of bytes) of an object? I figure this can be done by serializing the object to disk and measuring the file size - but I definately don't want to do...
10
by: lalnamar | last post by:
I want to execute a unix time command using perl, and capture the output (specifically, the time it takes the command to execute). i tried using the system command: system("time command ");...
6
by: santhosh83 | last post by:
i wt a command that can use to acess a line from a file in unix
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
2
by: meetu3181 | last post by:
Hi All, I am new to perl.I need to parse a text file in unix which is having data like this .I need to to store each value in a seperate variable. The TXT FILE TO BE PARSED: HTTP_PORT = 7779...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.