Last active
February 8, 2023 09:21
-
-
Save Wadkar07/1f4d8321d49359656d5cf28124ebee3a to your computer and use it in GitHub Desktop.
Command_drill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/bash | |
# Creating_directory_structure | |
mkdir -p hello/{one/two/three/four,five/six/seven} | |
touch hello/five/six/c.txt hello/five/six/seven/error.log hello/five/six/seven/error.log hello/one/{a.txt,b.txt} hello/one/two/d.txt hello/one/two/three/e.txt hello/one/two/three/four/access.log | |
# Delete all the files having the .log extension | |
find . -name '*.log' -delete | |
echo Deleting file with the .log extension | |
# Add the following content to a.txt | |
echo "Unix is a family of multitasking, multiuser computer operating | |
systems that derive from the original AT&T Unix, development | |
starting in the 1970s at the Bell Labs research center by Ken | |
Thompson, Dennis Ritchie, and others." >> ./hello/one/a.txt | |
# Deleting the directory named five. | |
rm -R hello/five | |
# Renaming the one directory to uno | |
mv hello/one hello/uno | |
# Moving a.txt to the two directory | |
mv hello/uno/a.txt hello/uno/two |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment