Following is the command I recently used to move all the files in the home directory to a directory named others.
$ for i in `ls -l | grep -v '^d' | grep -v '^l' | awk '{print $8}'`; do mv "$i"\* others ; done
$ for i in `ls -l | grep -v '^d' | grep -v '^l' | awk '{print $8}'`; do mv "$i"\* others ; done
No comments:
Post a Comment