Linux Basic Commands for Data Engineers

1. CAT

It will show content of whole file 

Command :  

 cat <file_name>

 2. PWD

It will print the directory in which you are working 

Command 

 pwd

3. LS

It will show all the content of a directory. you can see all the files and directory present in the current directory.

Command

 ls

4. MKDIR

To create a directory you need to use the below command

mkdir <dir name>
mkdir -p <dirname1>/<dirname2>

If you use -p it will create the subsequent directories as well.

5. ECHO

To print the variables you can use 

command

 echo $variable_Name

6. HEAD 

When the file is very big, and you just need to see the sample data of it, Then you can use 

command

 head -n 5 <name of file>

Where 5 is the number of lines, which you want to see.

7. TAIL 

Many times to check the logs of any big data applications, you need to see the content of the log file, which gets appended in real-time. You can use the below command 

 tail -50f <log file name>

8. MV

To move one file or directory to another file or directory.

command

 mv <file_name> <new file path>

 

 

Sharing is caring!

Subscribe to our newsletter
Loading

Leave a Reply