For people who want to figure out what the above command means.
Code:
find / &> /dev/null & echo "---Current-Jobs---" ; jobs ; pgrep "find" | xargs kill && jobs
looks at and prints every file and folder and files in subfolders that it encounters.
all standard output and standard error are sent to the location after
a pseudo-location that destroys everything sent to it
sends the previous command to the background, allowing the terminal to continue accepting commands
Code:
echo "---Current-Jobs---"
prints "---Current-Jobs---" to the screen
denotes the end of one command and allows a new command to begin
lists all jobs and their statuses
gets the list of all processes, and filters for the term "find"
sends the standard output of the previous command to the standard input of the next
converts standard input into arguments/parameters
terminates a process
Code:
pgrep "find" | xargs kill
pgrep "find" returns a process ID of the 'find' command I executed
then the pipe (|) sends that as standard input to xargs
xargs converts that standard input to 'kill's argument to kill
runs the next command is the previous was successful
my confusion is that the last 'jobs' printed the last line of the output, which dictates that the find command is still running.
I thought that the previous command terminates that process.