• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux uname Download

uname

March 13, 2007
Uname is a unique variant of the executable file 'uname'.
Version 0.1
License GPL
Platform Linux
Supported Languages English
Homepage www.zazzybob.com
Developed by Kevin Waldron
Uname is a software tool that offers users a special version of uname that comes equipped with various features. These features include -a, -s, -r, -n, -v, and -m options. To use these features, users can follow the USAGE instructions: uname [options]

The available options are:
-s : To print the kernel name
-v : To print the kernel version
-r : To print the kernel release
-n : To print the network node hostname
-m : To print the machine hardware name
-a : To print all of the above

If no options are provided, uname acts like uname -s. The tool can be accessed through the following sample code:

#include < unistd.h >
#include < sys/utsname.h >
#include < stdio.h >
#include < stdlib.h >
#include < string.h >

void print_usage(void);

int main( int argc, char *argv[] ) {
int c;
extern char *optarg;
extern int optind, optopt;
int a_flag = 0, s_flag = 0, n_flag = 0, r_flag = 0, v_flag = 0, m_flag = 0;
int errflag=0;
char host[256];
struct utsname uts;

if (gethostname(host, 255) != 0 || uname(&uts) < 0) {
fprintf(stderr, "Unable to get host information\n");
exit(1);
}

If no options are provided, the uname system will print the basic system name (sysname). However, when provided with one or more options, it will parse the options and print relevant details. If any erroneous options are passed while executing the program, it will print a usage info before exiting.

if (errflag != 0) {
print_usage();
exit(1);
}
char *sysname, *machine, *nodename, *release, *version;
sysname=uts.sysname;
machine=uts.machine;
nodename=uts.nodename;
release=uts.release;
version=uts.version;

The program will then allocate memory space for all eventualities and execute the corresponding option using strcat, prints it with only valid options.

if (a_flag == 1) {
printf("%s %s %s %s %s\n",sysname, nodename, release, version, machine);
} else {
char *printstring;
/* allocate enough space for all eventualities....*/
printstring = (char *) malloc(strlen(sysname)+strlen(version)+strlen(release)+strlen(nodename)+strlen(machine)+6);
strcpy( printstring , "");
if (s_flag == 1) {
strcat( printstring, sysname );
strcat( printstring, " ");
}
if (n_flag == 1) {
strcat( printstring, nodename );
strcat( printstring, " ");
}
if (r_flag == 1) {
strcat( printstring, release );
strcat( printstring, " ");
}
if (v_flag == 1) {
strcat( printstring, version );
strcat( printstring, " ");
}
if (m_flag == 1) {
strcat( printstring, machine );
strcat
What's New

Version 0.1: N/A

Free Download 2K
303
  • Share on:

Most Popular

  1. Quicksilver Forums 1.4.2
    115
  2. SlideMap 1.2.2
    96
  3. DynVPN 1.0
    78
  4. CherryTV 0.1
    78
  5. porm r2
    77
  6. WikEd
    74
  7. Dvgrab 3.4
    74
  8. xstereograph 2.1
    71
  9. Intel Software Development Emulator 1.70
    69
  10. Proxy filesystem for FUSE 1.0.0
    64

Related Downloads

KSqlAnalyzer
KSqlAnalyzer simplifies the task of accessing MS SQL database data. It is ...
MySQL Data Dumper
As envisioned by a MySQL DBA and support engineer, 'mysqldump' is a ...
no-name-jet
A contemporary and impressive GNOME desktop theme to beautify your interface.
RealVNC
A software that enables remote access and control of one device from ...
jp2a
JP2A converts JPG images to ASCII format. It's a small utility software.
MiniDV Assembler
MiniDV Assembler is a software designed for digital MiniDV camera owners, providing ...
Physics-Live CD Mini
Physics-Live CD is a simulation software that focuses on physics, and is ...
MyPmps
Mind your Project is a software tool for effective project management. With ...
aria2fe
Aria2fe is a GUI for aria2, a CLI-based program, providing users with ...
TraitsBackendWX
WxPython provides a backend for the Pyface Traits and TraitsGUI libraries, enabling ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.