Linux Command-Line Journey Day-7
@laks wrote: Linux Background and Foreground Process So we know there is a first process named 'init' with pid. This is parent of all process in the system. And a process named 'bash' interacts...
View ArticleLinux CommandLine Journey Day-8
@laks wrote: Linux Process states Lets discuss about process states. man ps shows process can be any one of the following states D Uninterruptible sleep (usually IO) R Running or runnable (on run...
View ArticleBackup data during mv command
@laks wrote: lets say we have empty directory 'i'$ ls i We want to move a file named 'a' into that directory. $ mv a i/ Simple so far. later sometime, a new file created with same name 'a'. $ touch a...
View ArticleAbout the Site Feedback category
@system wrote: Discussion about this site, its organization, how it works, and how we can improve it. Posts: 1 Participants: 1 Read full topic
View ArticleWelcome to Discourse
@system wrote: Your online Linux ~ The first paragraph of this pinned topic will be visible as a welcome message to all new visitors on your homepage. It’s important! Edit this into a brief...
View ArticleProg#225: nl command
@angala wrote: /* nl command Program#225 */ #include<stdio.h> main(int argc,char *argv[]) { int i,j,p,h; char a[200]; if(argc!=2) { printf("error: no.of arg"); return 0; } p=open(argv[1], 0);...
View ArticleProg#226: page command
@angala wrote: /* page command Program#226 */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,j,n; char a[800]; if(argc!=2) { printf("error: no.of arg"); return 0; } p=open(argv[1], 0);...
View ArticleProg#227: word count
@angala wrote: /* word count Program#227 */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,j,w,c,l,k,n; char a[100]; if(argc!=2) { printf("error: no.of arg"); return 0; }...
View ArticleProg#228: grep command
@angala wrote: /* grep command Program#228 */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,j,k,l,n,m; char a[200]; if(argc!=3) { printf("error: no.of arg"); return 0; }...
View ArticleProg#229: grep all files
@angala wrote: /* grep all files Program#229 */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,j,k,l,m,c,n; char a[100]; if(argc<3) { printf("error: no.of arg"); return 0; } c=2;...
View ArticleProg#230 A: copy command
@angala wrote: /* copy command Program#230 A */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,q; char a[512]; if(argc!=3) { printf("error: no.of arg"); return 0; } p=open(argv[1], 0);...
View ArticleProg#230 B: copy command
@angala wrote: /* copy command Program#230 B */ #include<stdio.h> main(int argc,char *argv[]) { int p,i,q; char a[512]; if(argc!=3) { printf("error: no.of arg"); return 0; } p=open(argv[1], 0);...
View ArticleProg#231: merge 2 files
@angala wrote: /* merge 2 files Program#231 */ #include<stdio.h> main(int argc,char *argv[]) { int i,p,q,r; char a[512]; if(argc!=4) { printf("error: no.of arg"); return 0; } p=open(argv[1], 0);...
View ArticleProg#232: read from k/b & write into file single record
@angala wrote: /* read from k/b & write into file single record Program#232 */ #include<stdio.h> main(int argc,char *argv[]) { int i,p,q; char a[512]; union xyz{ struct bio{ char name [20],...
View ArticleProg#233 A: read by block & display the structure
@angala wrote: /* read by block & display the structure Program#233 A */ #include<stdio.h> main(int argc,char *argv[]) { int i,p; char a[512]; union xyz{ struct bio{ char name [20], addr...
View ArticleProg#233 B: read a block from the file & display single record
@angala wrote: /* read a block from the file & display single record Program#233 B */ #include<stdio.h> main(int argc,char *argv[]) { int i,p; char a[512]; union xyz{ struct bio{ char name...
View ArticleProg#234: read until name !=$ & write into file
@angala wrote: /* read until name !=$ & write into file Program#234 */ #include<stdio.h> main(int argc,char *argv[]) { int i,p; char a[512]; union xyz{ struct bio{ char name [20], addr [20];...
View ArticleProg#235: read from file & display it until eof
@angala wrote: /* read from file & display it until eof Program#235 */ #include<stdio.h> main(int argc,char *argv[]) { int i,p; char a[512]; union xyz{ struct bio{ char name [20], addr [20];...
View ArticleProg#236: display nth record
@angala wrote: /* display nth record Program#236 */ #include<stdio.h> main(int argc,char *argv[]) { int n,i,p,o; int len; union xyz{ struct bio{ char name [20], addr [20]; int age; float salary;...
View ArticleProg#237: edit nth record
@angala wrote: /* edit nth record Program#237 */ #include<stdio.h> main(int argc,char *argv[]) { int len,n,i,p,o; union xyz{ struct bio{ char name [20], addr [20]; int age; float salary; }a;...
View Article