Bash morning session
- Instructor / helpers / course introduction.
- Distribute the usernames and the password.
- Let’s try to log in to the training cluster.
- Review the program for this morning: you have 1h15m of materials to read/watch.
By mid-day you should be comfortable with:
- creating and deleting files and directories, copying and moving them
- writing text into a file and printing its contents to the terminal
- working with
tar
archives - copying files to/from a remote server
- redirecting output to a file
- using Unix wildcards (* character)
- using pipes to construct longer commands
- working with Unix loops
Some of the hands-on exercises we will do in the mid-day Zoom session:
- Many exercises on navigating the filesystem.
- Combine
ls
andhead
into a one-line command to show three largest files (by the number of bytes) in a given directory. - Write a one-line command to show the name of the longest (by the number of lines) *.pdb file in the current directory.
- Working with environment variables.
- Write a loop to rename all *.txt files in a given directory to *.bak files.
- Write a loop to replace spaces to underscores in all file names in the current directory.