BLOG · 4/4/2023
A small report on completion of the assigned tasks.
ls
| : | Lists the contents of dir | \| | cd
| : | Changes current dir |\n> | pwd
| : | Print working directory | \| | mkdir
| : | Makes new directory |\n> | rm
| : | Removes a file or dir | \| | mv
| : | Move or rename files |\n> | sudo
| : | Elevates code privileges | \| | cat
| : | Concatenates files |\n\nThe task was completed by executing all the subtasks as shown in the image. Refer to the code below or this for more clarity.\n\n export \PS1=$ "\n $ pwd\n /home/cg/root/63e2386864f09\n $ cd /etc/..\n $ pwd\t\t\t\t\t\t\t//reads your location\n /\n $ mkdir /tmp/test\t\t\t //creates directory\n $ cd tmp/test\t\t\t\t\t//dives into mentioned path\n $ > blank.txt\t\t\t\t\t//creating blank file\n $ ls\t\t\t\t\t\t\t//listing the contents of the folder\n Blank.txt\n $ for i in {1..2600}; do mkdir F$i; done\t//creating 2600 folders\n $ > count.txt\t\t\t //a blank file to count and list them\n $ wc -l count.txt\t\t\t//initial count = 0\n 0 count.txt\n $ ls > count.txt\t\t //listing all the files in current folder into the blank file\n $ wc -l count.txt\t\t //final count = 2600 + 2\n 2602 count.txt\t\t //as both the count.txt and blank.txt files are included with new \n 2600 files\n $ echo "This is the file one." > file1.txt\t\n $ echo "This is the file two." > file2.txt\n $ cat file1.txt file2.txt > file.txt\t\t//concatenation of two text files\n $ cat file.txt\t\t\t\t //display of the concatenated content\n This is the file one.\n This is the file two.\n $\n\n| About | ... | Image |\n|---:|---:|:---:|\n| Main Code with following Outcomes | : |