This repository is a small collection of several Operating System commands, some of them already implemented in the UNIX systems, but others expand the OS ones to provide better functionality. Operating systems project 1.
We use Wall and Wextra as options to request or suppress warnings
Wall: This enables all the warnings about constructions that some users consider questionable, and that are easy to avoid (or modify to prevent the warning), even in conjunction with macros.
Wextra: This enables some extra warning flags that are not enabled by -Wall. (This option used to be called -W. The older name is still supported, but the newer name is more descriptive.)
$ make
gcc -Wall -Wextra libreria.c test.c -o test
There are other commands that are not in test.c file and they are not for the university project
$ make
gcc -Wall -Wextra myDiff.c -o myDiff
You can change "myDiff" for other command name
File that implements a function which prints the last n lines of its input. By default, n is 10. The tail command copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is used.
$ ./test tail <N> <file>
File that implements a function which copy the first "n" bytes of a file into a new one. The number of bytes can be specified. The first specified file is the source and the second one is the destination one. In case that the second file does not exist, it will be created.
$ ./test head <N> <file>
File that implements a function which prints the longest lines of its input. By default, n is 10.
$ ./test longlines <N> <file>
Command to change the directory/folder of the terminal's shell. You can press the tab button in order to auto complete the directory name
$ ./myCd [directory]
File that implements a function which compares 2 existing files and determine if they are equal or not.
$ ./myDiff <file1> <file2>
Print a sequence of numbers.
mySeq [OPTION]... LAST
mySeq [OPTION]... FIRST LAST
mySeq [OPTION]... FIRST INCREMENT LAST
$ ./mySeq [First] [Increment] [Last]
These commands are designed to work in a UNIX (GCC Compiler needed). Max OSX or Any Linux distribution