|
I am using RHEL 4
i am using syscall stat as follows:-
if (stat ("file",&stat_obj)){
if (errno == ENOENT){ printf("File not found"); }else{ printf("Unexpected error occured %d ",errno); }
}
sometimes i get error message as ""Unexpected error occured 0...
Started by anish on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Like -D_TS_ERRNO for thread-safe errno, but no such flag is needed on Linux.)
Does it give you any meaningful error message if you call it like this?
if (stat("file", &stat_obj) == -1) { perror("stat"); }
Do you have....
|
|
2.7M lines last year
10K lines added a day.
5K lines deleted per day.
I keep thinking this can't be sustained. What happens next?
At the same time, well, as pointed out, we all use it all the time.
I'm sending this from gmail.
Or you can use Linux ...
Started by rminnich@gmail.com on
, 40 posts
by 16 people.
Answer Snippets (Read the full thread at omgili):
linux is the f4 of computing?
- erik
I'm not....
d
On Tue, Sep 22, it's said that the f4 is proof that given
enough thrust even a brick will fly.
On an SGI Altix (and that's ignoring stuff like uClinux, RT-
Linux, etc).
|
|
Following in the spirit of Hidden Features of Powershell and various others on StackOverflow, what Linux commands or combinations of commands do you find essential in your work?
Started by Chris Bunch on
, 43 posts
by 42 people.
Answer Snippets (Read the full thread at serverfault):
Perhaps....
:-D
I was surprised to find that you can run remote GUI applications over on remote servers without having to punt tcpdump files around:
ngrep -d any -W byline port 80
for example built to use pthreads).
Through the rest of them.
|
Ask your Facebook Friends
|
I want an easy way to create multiple directories in C++/Linux.
For example I want to save a file lola.file in the directory:
/tmp/a/b/c
but if the directories are not there I want them to be created automagically. A working example would be perfect.
Started by Lipis on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Status:
mkdir -p /tmp/a/{b,c}/d
Will create the following paths:
/tmp/a/b/d /tmp/a/c/d
The braces allow you; #include "sysstat....
#include <sys/types.h> #include <sys/stat.h> int status; ...
But will work under Linux.
|
|
On Wed, 01 Apr 2009 06:00:08 +0200, OK <otto@kaiser.de
http://gs.statcounter.com/#os-ww-daily-20080701-20090401
Sadly, not an April's fool....
Started by OK on
, 22 posts
by 11 people.
Answer Snippets (Read the full thread at omgili):
Hmm to generate charts like that using his
Linux based tools !
BTW why do you think the freetards prefer to discuss Microsoft's short
comings....
Peter Koehlmann told us that Linux had more penetration
in Germany than Apple.
That's strange.
|
|
I need to keep statistics of daily network traffic for a linux machine (CentOS 5).
Is there a way to do it using standard/native tools or utilities?
Or do I have to dowload special software for that?
Thanks.
Started by GetFree on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at serverfault):
Toivola <tst at iki dot fi> -q, --query query database -h, --hours show hours -d, --days show.
|
|
I am looking for a program that can detect all of the windows computers on the network and report back data such as IP address, computer name, cpu, memory, hdd, OS, etc
This is for a business.
Even if I have to install a small program on each computer...
Started by ripken204 on
, 15 posts
by 10 people.
Answer Snippets (Read the full thread at hardforum):
Then you need to know which drive letters (or in the case of Linux mine to setup normal things like windows and Linux server, a few switches and routers, then move that manualy by creating a service to ....
Value you need to check for that.
|
|
Hello,
I'm running a multithreaded java app in Linux RedHat 5.3 on a machine that has 8 cores (2 quad-core cpu's).
I want to monitor the cpu usage of each thread, preferably relative to the maximal cpu it can get (a single thread running on 1 of the cores...
Started by Yoav Schwartz on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Problem is that lots msg = String.format( "%s: %d ns cpu time, %d ns user time, blocked for %d ms, waited %d ms.
You can infer from stat files in /proc/PID/ and /proc/PID/task/PID/ .
|
|
In Windows/DOS, I can say rename myfile.* yourfile.* to change the name but keep the extension. How is that accomplished on Linux?
The man page only suggests how to change the extension, but that's the opposite of what I want.
Bonus:
I actually want to...
Started by torbengb on
, 8 posts
by 7 people.
Answer Snippets (Read the full thread at superuser):
You have a file:
$ jhead -n%Y-%m-%d-%f New_year.jpg New....
Filenames in Windows are case-insensitive, so in Linux you'll get broken links.
Use regular expressions to cut particular substrings.
There are no filename extensions in Linux.
|
|
Hi,
I'm trying to calculate the total size in bytes of all files (in a directory tree) matching a filename pattern just using the shell. This is what I have so far:
find -name *.undo -exec stat -c%s {} \; | awk '{total += $1} END {print total}'
Is there...
Started by yothenberg on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Import os.
Exec wc -c {} + | tail -n 1 | cut -d' ' -f 1
Python is part of most linux distributions.
|