Exercícios dos guiões da cadeira de Arquitetura de Computadores 1
Todos os exercícios foram resolvidos em 2021/22.
- EX1 - EX2 - EX3
- AC1-P-Aula1.pdf
- EX1 - EX2 - EX3
- AC1-P-Aula2.pdf
- EX1 - EX2 - EXTRA
- AC1-P-Aula3.pdf
- EX1 - EX2 - EX3 - EXTRA
- AC1-P-Aula4.pdf
- EX1 - EX2 - EX3
- AC1-P-Aula10.pdf
teste_2-2021 (não testado no Mars)
- Put Mars.jar in the directory you want it to open files and save files into
- Create a bash script with the name, for example, Mars.sh and put it anywhere you want.
- Put the following code inside Mars.sh:
#!/bin/sh
# Absolute path to the directory of Mars.jar
cd /absolute/path/to/mars/jar/folder
# Run Mars jar inside the directory specified above
java -jar Mars.jar
- Allow Mars.sh to execute:
Inside the folder of the script
$ chmod +x Mars.sh
- Run Mars.sh, which will open Mars.jar
$ ./Mars.sh
This is enough to make Mars.jar run in any directory you want.
- Edit .bashrc (or other file that might do the same job) as root with any text editor.
- Add the following alias to the bottom of that file:
# alias to run Mars.sh
alias mars='bash /absolute/path/to/Mars/sh/bash/file/Marsh.sh'
- Open a new terminal and run the alias in any directory you want and it will open Mars.jar.
$ mars
Notes to point 2:
- You can give any alias name you want, doesn't have to be 'mars'
- This is the path to the Mars.sh file, and not the path to Mars.jar file like it was in Open Mars in Specific Directory