How to get the counts of deleted files in unix/linux If you want to get the deleted files count by your rm command, use the verbose option (-v) and wc -l. To delete a file rm -f source_fname_*.txt To get the counts of deleted files rm -vf source_fname_*.txt | wc -l To find & delete […]
Read MoreTag: Unix Shell Scripting in BDM
How to find all writable files by a specific user in unix
Linux find command to list all files writable by a specific user To find all writable files in current directory that are writable by the current user: use the command writable find . -writable To find all writable files in a specific directory that are writable by the specific user: find {file_path} -writable -user {user_id} […]
Read MoreHow to get only filename from find command in Linux?
How to get only filename from find command in Linux? Normally find command will retrieve the filename and its path as one string. If you want to display only the filename, you can use basename command. find {file_path} -type f -iname {file_pattern} -exec basename {} ; find infa/bdm/server/source/path -type f -iname “source_fname_*.txt” -exec basename {} ; Search tags! How do I […]
Read MoreHow to Exclude All “Permission denied” messages When Using Find Command?
How to Exclude All “Permission denied” messages When Using Find Command in UNIX/LINUX? use 2>/dev/null The 2>/dev/null at the end of the find command tells your shell to redirect the standard error messages to /dev/null, so you won’t see them on screen. “/dev/null” is a virtual device file, Whatever you write to “/dev/null” will be […]
Read MoreHow to get the script output from informatica BDM command task!
If a command task is executing a shell script, you will get the exit code, standard output and standard error from the script in the Command task output. You can assign these fields to a workflow variable in the “Command Task Output” and use later in the workflow. Let’s consider a shell script which will […]
Read More