Using ls, awk, and sed To Make a List of Files in a Linux Directory and Prepend mv in Front of each line Computers and Networking Jul 222012 ls |awk ‘{print $9}’|sed ‘s/^[\t]*/mv /’ > ListOfFiles.txt