Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
1 answer
97 views

Recursively Copy Dotfiles from Git Repo to New System's Home Directory

I manage my dotfiles in a github repo. The idea would be that I could clone the repo if I ever have to develop on a new system and symlink them to the home ...
Jordan Mandel's user avatar
3 votes
1 answer
293 views

Writing a tail command clone

I'm reading Bruce Molay's book on Unix programming, and as an exercise I've implemented a copy of the tail command. My approach goes over the entire file once, to ...
albert's user avatar
  • 133
2 votes
1 answer
102 views

Rsync helper in C (Improved)

Last week I posted a previous version of this code. I improved the program and worked on it for a few days and I would love to get reviews, feedback and tips so I could learn more and more from you ...
yan_kh's user avatar
  • 87
3 votes
1 answer
227 views

UNIX cp multithreaded implementation in C

I recently finished a high school project of mine for a class revolving around creating my own multithreaded implementation of the "cp" terminal command in UNIX systems. I am seeking for ...
user avatar
4 votes
2 answers
502 views

Implementation of portscanner for a host

I have tried to check whether the ports of a host from port 0 to port 1023 is open or not. Could someone please review this code and provide feedback. ...
Paul's user avatar
  • 297
3 votes
1 answer
262 views

Finding the class to which the IP address belongs

I have tried the code for finding the class of the IP address the user inputs, and printing the network and the host bits in the IP address. Could someone please review this approach and provide ...
Paul's user avatar
  • 297
8 votes
4 answers
537 views

Implementation of system() function in Linux using fork() , exec() and waitpid() system calls

I have written the code for implementation of system() function using fork(), exec() and waitpid(). Could someone please review this code and provide feedback. Thanks a lot. ...
Paul's user avatar
  • 297
4 votes
2 answers
86 views

Implementation of cp program that prints the number of bytes copied

I have written the code for implementation of the cp program that prints the number of bytes copied when the user presses Ctrl-C. Could someone please review this code and provide feedback. Thanks a ...
Paul's user avatar
  • 297
2 votes
1 answer
47 views

Reproduce the system() function of linux

My mentor says to reproduce the system() function of Linux exactly as given in the man pages. I have written the below code. Could someone review this code and provide me any suggestions for ...
Paulson Raja L's user avatar
2 votes
1 answer
98 views

The code reads from a specified offset to the specified number of bytes in a file

The code reads the specified number of bytes from a specified offset in a file, I have handled the partial reads and bytes > buf_size conditions. Could anyone review the code? and say whether the ...
Paulson Raja L's user avatar
-2 votes
1 answer
86 views

The code reads the file from the specified offset to the specified number of bytes. How to handle errors of partial reads in reading a file [closed]

I could like to read a file from a specified offset to a certain number of bytes in a file. I would pass the filename, the offset, the number of bytes as an argument. The constraint is should use only ...
Paulson Raja L's user avatar
6 votes
1 answer
555 views

tar-backup V1.01 - backup script for Linux (full and differential backups)

This is the backup script itself. Make it executable and place it somewhere in your path: ...
xxxLCxxx's user avatar
2 votes
0 answers
210 views

Blocking serial port C library

I am planning to write a reasonably feature rich serial library but wanted to cut my teeth on something fairly basic. This serial library is fairly simple. It is a thin wrapper on the UNIX open, ...
arcomber's user avatar
  • 2,531
3 votes
1 answer
63 views

Script to report disk usage

I am trying to see how I can speed up the below script that reports disk usage. The timed find command towards the end is the problematic line that I am trying to ...
user186743's user avatar
2 votes
1 answer
73 views

Making a disk usage breakdown

I'm looking for a better way of doing this code I made. I work for tech support and one of the biggest questions I am asked is: "Hey, how did my disk get so full in my VPS?" I am aiming for output ...
Charles Wilson's user avatar

15 30 50 per page