Sponsored Content
Operating Systems Linux Gentoo how to edit linux system files? Post 302273754 by Corona688 on Monday 5th of January 2009 05:24:37 PM
Old 01-05-2009
Quote:
Originally Posted by Dragster93
Oh yeah... Sorry about that, dude!

So, will I be able to edit any of those files while running linux or not?
If you mean libraries, then probably not, at least not directly. These libraries are all translated into machine code before they can be used, the linux-equivalents of .exe and .dll files. They do not contain source code; the system understands them but reading them yourself would be like trying to read a novel with a microscope.

You could download source code for a library, build your own version, then coerce your system into temporarily using your new ones for something(I advise against replacing them outright, that's just begging for trouble).
Quote:
First of all, can I even view those files while running linux or not?
You can download and view the source code they were made from -- it'll be pure text. If you mean viewing the raw kernel and libraries themselves, no, they're raw machine language. You could open them up in some editor if you really wanted but they'd look like garbage.
Quote:
Also, can you explain to me how these other versions of linux have been created? I mean, how did those creators get the source code of linux?
They probably downloaded it from kernel.org . Different distributions of linux usually are more about differences in the software bundled with it than changes in the kernel itself, usually. Ubuntu uses the Gnome window manager, for instance, while Kubuntu uses KDE, no changes to linux were needed for that.
Quote:
Is it so simple that I can just google it?
You don't quite know what you're asking yet, learning more about C programming would be a good direction. Forget the kernel for a while and figure out how things like compilation and libraries work, and you'll have a much better idea of what the kernel is and how its made.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help to access/mount so to access folder/files on a Remote System using Linux OS

Hi I need to access files from a specific folder of a Linux system from an another Linux System Remotely. I know how to, Export a folder on One SCO System & can access the same by using Import via., NFS in the Sco Unix SVR4 System using the scoadmin utility. Also, I know to use mount -t ... (2 Replies)
Discussion started by: S.Vishwanath
2 Replies

2. UNIX for Dummies Questions & Answers

Edit Multiple Files in VI

Here's what I have... $ vi foo1 - open foo1 and work around for a while. I yank a few lines into a buffer and then :w to save. Next I :e foo2 to open foo2 and paste my buffer. I :w to save, but I would like to then be able to go directly back into foo1 where I was before I opened foo2. ... (4 Replies)
Discussion started by: djschmitt
4 Replies

3. Windows & DOS: Issues & Discussions

RTF files can they be converted once they are on linux system

:D mount -t vfat /dev/hda1 /mnt my dillemma is simple i have psion 5 mx wich is an epoc type machine not only does it only work on windows as far as I know but I have to convert the files (the usual stuff!) sometimes a humen error happens and the files that I want to transfer to the linux drive... (7 Replies)
Discussion started by: moxxx68
7 Replies

4. UNIX for Dummies Questions & Answers

edit _config files

Hi, I am trying to edit sshd_config file through the vi editor. logged on as a root. when I try to write the file I get: Read-only file, not written; use ! to override when i type :w!, I get: Error: etc/ssh/sshd_config Permission denied. I want to change: #PermitRootLogin no to yes freeBDS... (6 Replies)
Discussion started by: emosms
6 Replies

5. UNIX for Dummies Questions & Answers

How files can be transferred from one system to another securely using Linux?

i need to know how files can be transfered from one system to another securely in linux. (9 Replies)
Discussion started by: bibing
9 Replies

6. Shell Programming and Scripting

Edit .profile to connect to Oracle- Linux 2.6.9-89

Hi, I want to connect to sqlplus through unix. I got the command to do it. But I was getting error: ./executeSQL.ksh: sqlplus: not found Then when I googled I found that we have to include Oracle Client path in .profile file. I don't know how to do it. Also I don't have permissions to... (2 Replies)
Discussion started by: dips_ag
2 Replies

7. UNIX for Dummies Questions & Answers

Edit files with cat

Hi, sometimes one wants to edit files while still seeing output of earlier commands in terminal. I've found out that cat test && cat - >> test does the trick for displaying file content and adding lines but I believe I saw a much cooler command that was also able to erase lines from files. I cannot... (6 Replies)
Discussion started by: scarleo
6 Replies

8. AIX

Accessing files on AIX system from Linux system

I have a following requirement in production system 1 : LINUX User: abcd system 2: AIX (it is hosting a production DB) Requirement user abcd from system 1 should have read access on archive log files created by DB on system 2. The log files are created with permissions 540 by user ora ,... (2 Replies)
Discussion started by: amitnm1106
2 Replies

9. Shell Programming and Scripting

Gunzip and edit many files

Experts - I have an requirement to gunzip and edit many files in a pair of directories. I have two scripts that work great when run separately, but I'm having problems combining the two. The goal is to gunzip the files found in the first script and pipe them to the bash/sed script and... (9 Replies)
Discussion started by: timj123
9 Replies
STATFS(2)						     Linux Programmer's Manual							 STATFS(2)

NAME
statfs, fstatfs - get file system statistics SYNOPSIS
#include <sys/vfs.h> int statfs(const char *path, struct statfs *buf); int fstatfs(int fd, struct statfs *buf); DESCRIPTION
statfs returns information about a mounted file system. path is the path name of any file within the mounted filesystem. buf is a pointer to a statfs structure defined as follows: struct statfs { long f_type; /* type of filesystem (see below) */ long f_bsize; /* optimal transfer block size */ long f_blocks; /* total data blocks in file system */ long f_bfree; /* free blocks in fs */ long f_bavail; /* free blocks avail to non-superuser */ long f_files; /* total file nodes in file system */ long f_ffree; /* free file nodes in fs */ fsid_t f_fsid; /* file system id */ long f_namelen; /* maximum length of filenames */ long f_spare[6]; /* spare for later */ }; File system types: linux/affs_fs.h: AFFS_SUPER_MAGIC 0xADFF linux/efs_fs.h: EFS_SUPER_MAGIC 0x00414A53 linux/ext_fs.h: EXT_SUPER_MAGIC 0x137D linux/ext2_fs.h: EXT2_OLD_SUPER_MAGIC 0xEF51 EXT2_SUPER_MAGIC 0xEF53 linux/hpfs_fs.h: HPFS_SUPER_MAGIC 0xF995E849 linux/iso_fs.h: ISOFS_SUPER_MAGIC 0x9660 linux/minix_fs.h: MINIX_SUPER_MAGIC 0x137F /* orig. minix */ MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */ MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */ MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */ linux/msdos_fs.h: MSDOS_SUPER_MAGIC 0x4d44 linux/ncp_fs.h: NCP_SUPER_MAGIC 0x564c linux/nfs_fs.h: NFS_SUPER_MAGIC 0x6969 linux/proc_fs.h: PROC_SUPER_MAGIC 0x9fa0 linux/smb_fs.h: SMB_SUPER_MAGIC 0x517B linux/sysv_fs.h: XENIX_SUPER_MAGIC 0x012FF7B4 SYSV4_SUPER_MAGIC 0x012FF7B5 SYSV2_SUPER_MAGIC 0x012FF7B6 COH_SUPER_MAGIC 0x012FF7B7 linux/ufs_fs.h: UFS_MAGIC 0x00011954 linux/xfs_fs.h: XFS_SUPER_MAGIC 0x58465342 linux/xia_fs.h: _XIAFS_SUPER_MAGIC 0x012FD16D Fields that are undefined for a particular file system are set to 0. fstatfs returns the same information about an open file referenced by descriptor fd. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
For statfs: ENOTDIR A component of the path prefix of path is not a directory. ENAMETOOLONG path is too long. ENOENT The file referred to by path does not exist. EACCES Search permission is denied for a component of the path prefix of path. ELOOP Too many symbolic links were encountered in translating path. EFAULT Buf or path points to an invalid address. EIO An I/O error occurred while reading from or writing to the file system. ENOMEM Insufficient kernel memory was available. ENOSYS The filesystem path is on does not support statfs. For fstatfs: EBADF fd is not a valid open file descriptor. EFAULT buf points to an invalid address. EIO An I/O error occurred while reading from or writing to the file system. ENOSYS The filesystem fd is open on does not support statfs. CONFORMING TO
The Linux statfs was inspired by the 4.4BSD one (but they do not use the same structure). SEE ALSO
stat(2) Linux 2.0.30 1997-08-21 STATFS(2)
All times are GMT -4. The time now is 02:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy