DEV Community

KENNEDY NDUNGU WANJIRU
KENNEDY NDUNGU WANJIRU

Posted on Edited on

LINUX FUNDAMENTALS OF DATA ENGINEERING.

Linux commands have many applications but in this article we shall focus on data engineering.


The first step is to connect to a Linux server by using command shell or Power shell through Secure shell(SSH) eg ssh used for remote log in ,IP(Internet Protocol) and Password. To list the directories in the server use the ls function ls filename. To list the directories to see their sizes use ls -lh filename ,to see all the hidden files use ls -a filename .

Incase there are no directories in the server create one using mkdir filename then ls the filename to check its existence .mkdir -p path creates parent directories .However, if you would like to delete a directory use rmdir filename ,the ls filename to check if it has been deleted.pwd print working directory is used to display the current directory being worked on.eg postgresql# pwd
In the directories use ls filename to list all the files present in that directory. Also use touch filename to create your own files. To remove unwanted files use rm filename and check for its existence.
Incase there are many directories and you would like to shift from one to another use cd to goes back to home directory.
Use cd .. navigates up one level from the first cd. cd directory name goes directly to the said directory.
The mv filename function moves one file to another file without leaving a copy while cp moves one file to another but it leaves a copy.
head filename is used to show the first few content of a file while tail name used to show the last few content of a file. cat filename is used to display file contents.
find is used to find files through their names or dates. sudo command is used to run commands as a super user eg sudo adduser kenw . adduser is used to add a user to the server who can be easily identified by their name.
history command is used to show all the commands that have been run in the command line. It shows all the processes done to a directory.** man** is used to display all the commands in server and a brief description about them. eg man ls


Finally exit is used to exit the terminal.

Top comments (0)