I understand everything done by a computer is the result of a file regardless of what it is, this is important because it cleared up a lot of things done by computers that I couldn't comprehend prior to learning this.
Learned the basics of the ViM text editor, this will be extremely helpful to know in the future because as I understand more about Linux/Unix the more I suspect I will favor them in the not-too-distant future.
Today wildcars are introduced, they will be very helpful when searching long lists of entries or when I'd like to know how many entries there possibly are.
Today I learned about the use of scripts and their potential applications, this is exciting because the usefulness is only limited by how far you take it.
File modes (permissions)
Settings assigned to a file, influencing the access privileges of User(Host), Guest(not user, same terminal), and World(everyone else).
List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).
file copying/moving/renaming
File copying- When you of make a copy of a file or folder using the command cp. File moving- When you move a folder or file to a different location using the mv command. File renaming- When you rename a file or folder also uses the mv command.
Demonstration of the indicated keyword.
Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:
lab46:~$ vim file1 lab46:~$ ls Desktop Music Videos closet public_html Documents Pictures archive1.tar.gz file.c src Downloads Public archive2.zip file.gz the answer.txt Maildir Templates archives file1 lab46:~$ mv file1 file2 lab46:~$ ls Desktop Music Videos closet public_html Documents Pictures archive1.tar.gz file.c src Downloads Public archive2.zip file.gz the answer.txt Maildir Templates archives file2 lab46:~$ mv file2 /home/khoose2/src/Unix/submit/Opus lab46:~$ cd /home/khoose2/src/Unix/submit/Opus | ls file2
How can you both rename and and move files using the same command?
I hypothesize that the input 'mv file1 file2' will perform the action of changing the file name of 'file1' to 'file2'. I also hypothesize that the input 'mv file2 /home/khoose2/src/Unix/submit/Opus' will move the file 'file2' from the previous hypothesis test, to the final directory destination of Opus.
From what I have read it seems that the linux command 'mv' can be used to both rename and move files. The difference is the use of paths for moving files, and the use of file names when renaming.
I will;
1.) create a sample file named 'file1' by inputing the command 'vim file1'. A.) once in the vi text editor type ':wq', exiting the file and saving it. B.) enter the input command 'ls' to verify the creation of file 'file1'. B.) enter the input command 'mv file1 file2'. C.) enter 'ls' to verify the change of name to 'file2'. 2.) enter the input command 'mv file2 /home/khoose2/src/Unix/submit/Opus'. A.) input the command 'cd /home/khoose2/src/Unix/submit/Opus | ls'; thus displaying the contents of the specified directory to verify the file 'file2' was successfully moved.
lab46:~$ vim file1 lab46:~$ ls Desktop Music Videos closet public_html Documents Pictures archive1.tar.gz file.c src Downloads Public archive2.zip file.gz the answer.txt Maildir Templates archives file1 lab46:~$ mv file1 file2 lab46:~$ ls Desktop Music Videos closet public_html Documents Pictures archive1.tar.gz file.c src Downloads Public archive2.zip file.gz the answer.txt Maildir Templates archives file2 lab46:~$ mv file2 /home/khoose2/src/Unix/submit/Opus lab46:~$ cd /home/khoose2/src/Unix/submit/Opus | ls file2
Based on the data collected:
My hypothesis was correct, the actions I predicted were verified by my experiment and testing. There were no errors and the command were accepted without question.
Thanks to my experiment I illustrated the example of how the Linux command 'mv' can be used for both moving files and renaming files, depending on the use of paths or file names. This illustration proves my hypothesis correct.