copy result of ls command line code example Example: how to take output of command in cp linux cp `ls -SF | grep -v / | head -5` Directory