Assignment-4 Learn to Write Advanced Scripts
1.Create a script that accepts a filename as input and checks if it exists. 2.List the empty files in the current directory. 3.Write a script to copy files from one directory to another.(backup files) 4.Develop a script to delete all files with a specific extension in a directory.(cleaning up) 5..List the name,file size of ordinary files( avoid directories) in the current directory in the descending order of file size. ( Hint:Use tr,grep,tail,cut and sort command) 6.Display the contents of the smallest file( file size is lowest) 7.List the pid(process id), start time and process (command) of all running process.( Hint: use ps –aux command) 8.List the details of the process with process id 1.(Hint use ps command and grep) 9.List the permissions of user and file name of ordinary files in the current directory( avoid directories). (hint use grep, tr –s,cut –c ,paste. Cut the required fields and store in temporary files.Paste them together using paste.) 10.List the directories only with pe...