This is Readme for first set of Linux excercises.
Since we can not ssh to other server outside, we have to use what we have: your vagrant virtual machine;
#change directory from your home to soft
#this will connect to your virtual machine as user vagrant
#when asked for password, just type: vagrant
#Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
#now you are logged again as vagrant, but moved automaticaly to your home directory
#Q1: how do you check it?
#to finish being logged via ssh:
#Create few files using touch command:
#list the directory content
#check were you are right now in the diretory structure
#jumpt one directory above
#explore what is at the / of the file system
#jump back to the directory you have been before
#or if you are lost:
#there is a directory there called dir_tree
#one of the subdirectories contains file secret_file
Q: what is the secret?
#go to /home/vagrant/data/ex1/dir_tree/work3
# jump to your /home/vagrant/data/ directory using 3 different ways (absolute, combination of ../, special sign ~)
#go to /home/vagrant/data/ex1/perm_dir
# list files with permissions (ls -l) in this directory
Q1: change permissions for file6.txt. What is the first line?
Q2: there are two script files ending with sh. To execute them try:
What is the difference?
Q3: make my_script2.sh executable by changing permissions
Q1:copy file2.txt to file2.1.txt
Q2: rename file2.1.txt to file2.1.NEW.txt
Q3: copy file6.txt to student1 directory
Q4: go to student1 directory. Link both *sh scripts so these appear as soft links in this directory
#displays content of the file screen by screen
#same as above but you can scroll back
#displays just the first 10 top lines of the file
#displays the first 100 lines
head -100 myfile04.txt
#displays just the last 10 lines of the file
#displays the last 100 lines of the file
tail -100 myfile04.txt
wc myfile04.txt #newline, word, and byte counts for the file
# just count the lines of the file
wc -l myfile04.txt
Q1: gzip file1.gtf
Q2: go to student2 directory, untar the tar filelocated there
Q3: go to student3 directory (in ..), create gzipped tar from 3 files located there
Q1: there are 3 gzipped files there. Which ones are identical?