Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 1.83 KB

README.md

File metadata and controls

19 lines (14 loc) · 1.83 KB

Small scripts for BASH coding and learning

The code chunks and scripts in this repository are for a variety of uses, from learning commands and arguements to tips and tricks to help with small jobs (e.g., renaming files).

This list will be updated with time.

The Basics

Learning the command line can be tricky. To get started, the first thing to learn is how to navigate through directories (commonly known as 'folders'). These directories are set up in a hierarchical fashion on your system. In the example below, there is a directory called Data. Within this directory, there are three files: Spreadsheet.xlsx, Summary.docx, Rawdata.txt. The directory called Data is called the parenty directory of the three files within it.

Data
    Spreadsheet.xlsx
    Summary.docx
    Rawdata.txt

To learn how to navigate the terminal, as well as try some helpful commands for listing and manipulating files, check the following list of commands:

https://github.com/jbernst/small_scripts/blob/main/tutorial.txt. This file contains information on cd, mv, ls, cp, pwd, nano, grep, history, head, tail, sed, and rsync commands, as well as some SLURM commands.

Touching Files

Sometimes we need to update the date and time of our files. For example, if a computer cluster has a 90-day limit on files, in which files >90 days will be purged, you can use the command touch to update the files. For a short script on updating all files recursively from within a directory, check here:

https://github.com/jbernst/small_scripts/blob/main/recursive_touch.md