Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For each command give me the ENTIRE COMMAND SEQUENCE. If I ask you \'What comman

ID: 3705925 • Letter: F

Question

 For each command give me the ENTIRE COMMAND SEQUENCE. If I ask you 'What command would I use to move the file one.txt to the parent directory and rename it to two.txt?", the answer is NOT 'mv'. That is only part of the command.
  11. I just created the following shell script in the file "runme.sh":  #!/bin/sh find / -type f -name *.tmp -size +10k  -size -20k -exec rm {} ;  I save the file attempt to run it, and received the error bash: ./runme.sh: Permission denied.  Show me the command that solves the problem. (5 pts)   12. Create a command that will search for files under /etc that contain the keyword "PAM" and return a COUNT of the number of files found. That's all I want to see, a number which is a representation of the amount of files found - nothing else. (5 pts)   13.  Create a command that will identify files under /usr/bin that are greater than 10 kilobytes and less than 900MB. (5 pts)   14. Create a command that will run the script runthis.sh 33 minutes from now. (5 pts)   15. I've run 24 commands in the background from a terminal.  Some of these I know will take some time to complete. How would I find out what commands have not completed yet?  (5 pts) 

Explanation / Answer

11.

#!/bin/sh
sudo find / -type f -name *.tmp -size +10k -size -20k -exec sudo rm {} ;

now run using floowing commands

[user@dblab01 ~]$ chmod 745 /home/user/runme.sh

[user@dblab01 ~]$ ./runme.sh


and enter your rootuser password.

12.

[user@dblab01 ~]$ grep -R "PAM" /etc |wc -l


output

.

.

.

grep: /etc/sysconfig/system-config-firewall: Permission denied
grep: /etc/sysconfig/crond: Permission denied
grep: /etc/sysconfig/amtu: Permission denied
grep: /etc/sysconfig/xinetd: Permission denied
grep: /etc/sysconfig/ip6tables: Permission denied
grep: /etc/sysconfig/system-config-firewall.old: Permission denied
grep: /etc/sysconfig/networking/devices/keys-Auto_CSED_PG_LAB: Permission denied
grep: /etc/sysconfig/iptables-config: Permission denied
grep: /etc/sysconfig/iptables: Permission denied
grep: /etc/sysconfig/tgtd: Permission denied
grep: /etc/sysconfig/ipvsadm-config: Permission denied
grep: /etc/sysconfig/iptables.old: Permission denied
grep: /etc/sysconfig/dovecot: Permission denied
grep: /etc/sysconfig/rngd: Permission denied
329

13.

[user@dblab01 ~]$ find /usr/bin -type f -size -943718400 -size +10240 -ls


output:

[user@dblab01 ~]$ find /usr/bin -type f -size -943718400 -size +10240 -ls
964751 9872 -rwxr-xr-x   1 root     root     10107976 Jun 9 2015 /usr/bin/mongoexport
959734 9224 -rwxr-xr-x   1 root     root      9444984 Nov 11 2010 /usr/bin/umbrello
951816 9868 -rwxr-xr-x   1 root     root     10102168 Jun 9 2015 /usr/bin/mongoperf
963463 6100 -rwxr-xr-x   1 root     root      6243300 Nov 22 2013 /usr/bin/smbcacls
959685 9900 -rwxr-xr-x   1 root     root     10136040 Jun 9 2015 /usr/bin/mongorestore
963470 6024 -rwxr-xr-x   1 root     root      6165444 Nov 22 2013 /usr/bin/smbtree
933157 9864 -rwxr-xr-x   1 root     root     10098968 Jun 9 2015 /usr/bin/mongooplog
963407 6204 -rwxr-xr-x   1 root     root      6350244 Jun 9 2015 /usr/bin/mongos
959730 9904 -rwxr-xr-x   1 root     root     10141028 Jun 9 2015 /usr/bin/mongostat
953602 9868 -rwxr-xr-x   1 root     root     10102992 Jun 9 2015 /usr/bin/mongotop
963464 6136 -rwxr-xr-x   1 root     root      6280228 Nov 22 2013 /usr/bin/smbclient
964052 6732 -rwxr-xr-t   1 root     root      6890800 Feb 19 2015 /usr/bin/emacs-23.1
965370 9892 -rwxr-xr-x   1 root     root     10127892 Jun 9 2015 /usr/bin/mongofiles
962143 9856 -rwxr-xr-x   1 root     root     10089380 Jun 9 2015 /usr/bin/mongosniff
949266 9864 -rwxr-xr-x   1 root     root     10098392 Jun 9 2015 /usr/bin/bsondump
959356 9888 -rwxr-xr-x   1 root     root     10124100 Jun 9 2015 /usr/bin/mongoimport
957749 6092 -rwxr-xr-x   1 root     root      6235112 Nov 22 2013 /usr/bin/smbcquotas
953935 9896 -rwxr-xr-x   1 root     root     10132076 Jun 9 2015 /usr/bin/mongodump
950779 5712 -rwxr-xr-x   1 root     root      5847772 Sep 23 2011 /usr/bin/doxygen
963465 6344 -rwxr-xr-x   1 root     root      6493156 Nov 22 2013 /usr/bin/smbget
963461 7680 -rwxr-xr-x   1 root     root      7860420 Nov 22 2013 /usr/bin/rpcclient
948300 6004 -rwxr-xr-x   1 root     root      6144712 Nov 23 2013 /usr/bin/crash
957745 8712 -rwxr-xr-x   1 root     root      8920688 Nov 22 2013 /usr/bin/net
952337 125064 -rwxrwxr-x   1 user     user     128060049 Jul 25 2014 /usr/bin/Cisco-PT-610.tar.gz
956717 6196 -rwxr-xr-x   1 root     root      6341940 Feb 19 2015 /usr/bin/emacs-23.1-nox
957750 6120 -rwxr-xr-x   1 root     root      6263748 Nov 22 2013 /usr/bin/smbpasswd
929416 12080 -rwxr-xr-x   1 root     root     12368024 Jul 24 2015 /usr/bin/inkscape
966345 9948 -rwxr-xr-x   1 root     root     10183736 Jun 9 2015 /usr/bin/mongod

14.

we created a script called runthis.sh

#!/bin/bash

touch hello.txt

now running this command:

[user@dblab01 ~]$ ./runthis.sh | at now + 33 min

after 33 min file hello.txt has been created.

15.

[user@dblab01 ~]$ ps -aux

output

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

user      3640 0.0 0.0   8348 2904 ?        S    15:43   0:00 /usr/libexec/gvfsd-trash --spawner :1.2 /org/gtk/gvfs/exec_spaw/0
user      3651 0.0 0.2 102720 10468 ?        Sl   15:43   0:00 /usr/libexec/e-addressbook-factory
user      3655 0.0 0.0   7892 2120 ?        S    15:43   0:00 /usr/libexec/gvfsd-burn --spawner :1.2 /org/gtk/gvfs/exec_spaw/1
user      3675 0.0 0.0   7968 1928 ?        S    15:43   0:00 /usr/libexec/gvfsd-metadata
user      3681 6.2 5.2 1026060 207252 ?      Sl   15:43 10:04 /usr/lib/firefox/firefox
root      3812 0.0 0.0   2836 1284 ?        S    15:44   0:00 /sbin/dhclient -d -4 -sf /usr/libexec/nm-dhcp-client.action -pf /var/run/dhclient-wlan0.pid -lf /va
smmsp     3873 0.0 0.0 13048 1792 ?        Ss   15:44   0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root      3875 0.0 0.0 12664 2228 ?        Ss   15:44   0:00 sendmail: accepting connections
user      4952 10.0 7.3 875244 290184 ?       Sl   16:44   9:59 /usr/lib/firefox/plugin-container -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/brows
user      5631 3.9 0.3 78304 14804 ?        Sl   17:50   1:17 gnome-terminal
user      5633 0.0 0.0   2076   616 ?        S    17:50   0:00 gnome-pty-helper
user      5634 0.0 0.0   5260 1696 pts/0    Ss   17:50   0:00 bash
user      5995 0.0 0.0   4936 1064 pts/0    R+   18:23   0:00 ps -aux

thankyou!! :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote