#!/bin/sh

echo "lesson 2,3 Simple File Ingestion and Access, Simple Cleanup

Sinit -v

Smkdir SINGAPORE
Scd SINGAPORE
Spwd
Sls
Sls -l
date > /tmp/test1.txt
Sput -vf -S demo-ufs-sdsc /tmp/test1.txt .
Sls -l
Scat test1.txt
Sget -vf test1.txt /tmp/test2.txt
cmp /tmp/test1.txt /tmp/test2.txt
Sls -l

yes | rm -rf /tmp/test_dir3
mkdir /tmp/test_dir3
date > /tmp/test_dir3/test4.txt
sleep 1
date > /tmp/test_dir3/test5.txt
sleep 1
date > /tmp/test_dir3/test6.txt
Sput -fr -S demo-ufs-sdsc /tmp/test_dir3 .

Sls -l
Sls -l test_dir3
Scd test_dir3
Spwd
Sls -l
Scat test6.txt
Scd ..
yes | rm -rf /tmp/test_dir3
Sget -r test_dir3 /tmp
Srm -r  test_dir3
Sls -l
Spwd
Srm "test?.txt" 
Sls -l
Scd ..
Srmdir  SINGAPORE
Sls -l
Spwd

find /tmp/test_dir3 -print
yes | rm -r /tmp/test_dir3 

Sexit

