Script started on Mon Sep 9 12:32:46 2024 mweeks@air:Desktop$ ls -l hell* -rw-r--r--@ 1 mweeks staff 125 Sep 9 12:32 hello(1).c -rw-r--r--@ 1 mweeks staff 125 Aug 26 12:59 hello.c mweeks@air:Desktop$ diff hello.c hello\(1\).c mweeks@air:Desktop$ vi hello\(1\).c mweeks@air:Desktop$ diff hello.c hello\(1\).c 12a13 > // I am adding a comment here mweeks@air:Desktop$ rm hello\(1\).c mweeks@air:Desktop$ ls -l hell* -rw-r--r--@ 1 mweeks staff 125 Aug 26 12:59 hello.c mweeks@air:Desktop$ cat hello.c /* hello world */ #include int main (int argc, char *argv[]) { printf("hello world.\n"); return 0; } mweeks@air:Desktop$ gcc hello.c mweeks@air:Desktop$ ls -l a.out -rwxr-xr-x 1 mweeks staff 8432 Sep 9 12:43 a.out mweeks@air:Desktop$ ./a.out hello world. mweeks@air:Desktop$ rm a.out mweeks@air:Desktop$ gcc hello.c -o hello mweeks@air:Desktop$ ls -l hello* -rwxr-xr-x 1 mweeks staff 8432 Sep 9 12:45 hello -rw-r--r--@ 1 mweeks staff 125 Aug 26 12:59 hello.c mweeks@air:Desktop$ ls -l a.out ls: a.out: No such file or directory mweeks@air:Desktop$ ./ello bash: ./ello: No such file or directory mweeks@air:Desktop$ ./hello hello world. mweeks@air:Desktop$ echo $PATH /Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/share/dotnet:/usr/local/munki:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands mweeks@air:Desktop$ hello bash: hello: command not found mweeks@air:Desktop$ which archive /usr/local/bin/archive mweeks@air:Desktop$ ls -l hello* -rwxr-xr-x 1 mweeks staff 8432 Sep 9 12:45 hello -rw-r--r--@ 1 mweeks staff 125 Aug 26 12:59 hello.c mweeks@air:Desktop$ archive hello.c mweeks@air:Desktop$ ls -l hello* -rwxr-xr-x 1 mweeks staff 8432 Sep 9 12:45 hello -rw-r--r--@ 1 mweeks staff 125 Sep 9 12:58 hello.c -rw-r--r--@ 1 mweeks staff 125 Aug 26 12:59 hello_c.Aug_26_2024 mweeks@air:Desktop$ sftp snowball.cs.gsu.edu mweeks@snowball.cs.gsu.edu's password: Connected to snowball.cs.gsu.edu. sftp> put hello.c Uploading hello.c to /home/mweeks/hello.c hello.c 100% 125 26.9KB/s 00:00 sftp> put hello Uploading hello to /home/mweeks/hello hello 100% 8432 297.2KB/s 00:00 sftp> ls -l -rw-r--r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 40677 Sep 4 17:50 Sept4_2024.log -rw-r--r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 7926 Sep 4 18:33 Sept4_2024.txt -rw-rw-r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 0 Sep 4 13:29 donotdothis -rw-rw-r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 39 Aug 26 13:18 example1 -rw-r--r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Aug 26 13:34 example2 -rw-r--r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Sep 4 13:38 example3 -rwxr-xr-x 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 8432 Sep 9 13:03 hello -rw-r--r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 125 Sep 9 13:03 hello.c -rw-rw-r-- 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 115 Sep 4 13:18 testfile sftp> quit mweeks@air:Desktop$ echo It is not a goot idea to sftp compiled programs but you can do it It is not a goot idea to sftp compiled programs but you can do it mweeks@air:Desktop$ ssh snowball.cs.gsu.edu mweeks@snowball.cs.gsu.edu's password: Last login: Wed Sep 4 18:39:45 2024 from c-24-99-154-26.hsd1.ga.comcast.net + | GSU Computer Science | Instructional Server | SNOWBALL.cs.gsu.edu + [mweeks@gsuad.gsu.edu@snowball ~]$ ls donotdothis example2 hello Sept4_2024.log testfile example1 example3 hello.c Sept4_2024.txt [mweeks@gsuad.gsu.edu@snowball ~]$ more testfile one two three I am going to press control-Z I used fg to bring it to the foreground now I am going to press ctrl-D [mweeks@gsuad.gsu.edu@snowball ~]$ ls -al total 136 drwx------. 5 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Sep 9 13:03 . drwxr-xr-x. 369 root root 20480 Sep 9 12:44 .. -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 1171 Sep 4 18:44 .bash_history -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 18 Aug 16 14:04 .bash_logout -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 193 Aug 16 14:04 .bash_profile -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 231 Aug 16 14:04 .bashrc drwxrwxr-x. 3 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Aug 16 14:04 .cache drwxrwxr-x. 3 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Aug 16 14:04 .config -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 0 Sep 4 13:29 donotdothis -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 39 Aug 26 13:18 example1 -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Aug 26 13:34 example2 -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Sep 4 13:38 example3 -rwxr-xr-x. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 8432 Sep 9 13:03 hello -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 125 Sep 9 13:03 hello.c -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 40677 Sep 4 17:50 Sept4_2024.log -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 7926 Sep 4 18:33 Sept4_2024.txt drwx------. 2 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Sep 4 18:35 .ssh -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 115 Sep 4 13:18 testfile -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 750 Aug 26 13:18 .viminfo [mweeks@gsuad.gsu.edu@snowball ~]$ chmod 744 . [mweeks@gsuad.gsu.edu@snowball ~]$ ls -a | more . .. .bash_history .bash_logout .bash_profile .bashrc .cache .config donotdothis example1 example2 example3 hello hello.c Sept4_2024.log Sept4_2024.txt .ssh testfile .viminfo [mweeks@gsuad.gsu.edu@snowball ~]$ ls -al | more total 136 drwxr--r--. 5 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Sep 9 13:03 . drwxr-xr-x. 369 root root 20480 Sep 9 12:44 .. -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 1171 Sep 4 18:44 .ba sh_history -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 18 Aug 16 14:04 .ba sh_logout -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 193 Aug 16 14:04 .ba sh_profile -rw-------. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 231 Aug 16 14:04 .ba shrc drwxrwxr-x. 3 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Aug 16 14:04 .ca che drwxrwxr-x. 3 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 4096 Aug 16 14:04 .co nfig -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 0 Sep 4 13:29 don otdothis -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 39 Aug 26 13:18 exa mple1 -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Aug 26 13:34 exa mple2 -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 49 Sep 4 13:38 exa mple3 [mweeks@gsuad.gsu.edu@snowball ~]$ cp ../mweeks/hello.c .^C [mweeks@gsuad.gsu.edu@snowball ~]$ chmod 755 . [mweeks@gsuad.gsu.edu@snowball ~]$ cat hello.c /* hello world */ #include int main (int argc, char *argv[]) { printf("hello world.\n"); return 0; } [mweeks@gsuad.gsu.edu@snowball ~]$ cp -i ../mweeks/hello.c . cp: ‘../mweeks/hello.c’ and ‘./hello.c’ are the same file [mweeks@gsuad.gsu.edu@snowball ~]$ cp -i ../mweeks/hello.c testfile cp: overwrite ‘testfile’? n [mweeks@gsuad.gsu.edu@snowball ~]$ ls -l hello.c testfile -rw-r--r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 125 Sep 9 13:03 hello.c -rw-rw-r--. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 115 Sep 4 13:18 testfile [mweeks@gsuad.gsu.edu@snowball ~]$ ls -l hello -rwxr-xr-x. 1 mweeks@gsuad.gsu.edu mweeks@gsuad.gsu.edu 8432 Sep 9 13:03 hello [mweeks@gsuad.gsu.edu@snowball ~]$ echo remember that is the executable hello program remember that is the executable hello program [mweeks@gsuad.gsu.edu@snowball ~]$ ./hello -bash: ./hello: cannot execute binary file [mweeks@gsuad.gsu.edu@snowball ~]$ gcc hello -o hello hello: file not recognized: File truncated collect2: error: ld returned 1 exit status [mweeks@gsuad.gsu.edu@snowball ~]$ gcc hello.c -o hello [mweeks@gsuad.gsu.edu@snowball ~]$ ./hello hello world. [mweeks@gsuad.gsu.edu@snowball ~]$ cp hello.c bad_example.c [mweeks@gsuad.gsu.edu@snowball ~]$ echo Do not do this Do not do this [mweeks@gsuad.gsu.edu@snowball ~]$ cat bad_example.c /* hello world */ #include int main (int argc, char *argv[]) { printf("hello world.\n"); return 0; } [mweeks@gsuad.gsu.edu@snowball ~]$ gcc bad_example.c -o bad_example.c [mweeks@gsuad.gsu.edu@snowball ~]$ ./bad_example.c hello world. [mweeks@gsuad.gsu.edu@snowball ~]$ echo source code in bad_example.c has been overwritten source code in bad_example.c has been overwritten [mweeks@gsuad.gsu.edu@snowball ~]$ exit logout Connection to snowball.cs.gsu.edu closed. mweeks@air:Desktop$ exit exit Script done on Mon Sep 9 13:45:29 2024