switch for ls to view innode number linux code example
Example 1: how to check the size of a file in linux c
If you have the file stream (FILE * f):
fseek(f, 0, SEEK_END);
size = ftell(f);
fseek(f, 0, SEEK_SET);
Or,
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
fd = fileno(f);
struct stat buf;
fstat(fd, &buf);
int size = buf.st_size;
Or, use stat, if you know the filename:
#include <sys/stat.h>
struct stat st;
stat(filename, &st);
size = st.st_size;
Example 2: how to change the port number in command prompt for jenkins
java -jar jenkins.war --httpPort=8081