Useful commands in Linux

View the job launched via process id
xargs -0 < /proc/<pid>/cmdline
Get the history of commands run from a user.
grep -e "$pattern" /home/*/.bash_history


How to find the files difference between two directories in linux and also
ignoring the extension?

 
comm -13 <(find dir1 -type f -exec bash -c 'basename "${0%.*}"' {} \;   
| sort) <(find dir2 -type f -exec bash -c 'basename "${0%.*}"' {} \; 
 | sort) 
 
Type the above command in one line.

comm -13 - will show the filenames unique to directory 2
comm -12 - will show all filenames common to both directories
comm -23 - will show the filenames unique to directory 1.


grep -F -x -v -f fileB fileA
 
 
Github change author name without edit 
 
git rebase -i HEAD~4 -x "git commit --amend --author 'name <email>' --no-edit"