You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

9 lines
230 B

  1. #!/bin/sh
  2. rm -f ../week01/file.txt _ex2.txt
  3. echo "file" > ../week01/file.txt
  4. ln -f ../week01/file.txt _ex2.txt
  5. inode=$(find _ex2.txt -printf '%i')
  6. find .. -inum "$inode" > ex2.txt
  7. find .. -inum "$inode" -exec rm {} \; >> ex2.txt