Tag Info

Hot answers tagged

2

You're nearly there! This works: find . -mtime +30 -type f \( -name \*.xml -o -name \*.out \) Your / ( becomes \( (an escaped open parenthesis; as you discovered the shell treats ( specially so it needs to be escaped with \); likewise ) / should actually be \). The names need * to match anything ending with the given extension, and that also needs to be ...


1

Assuming that with folder you mean directory and assuming you have no spaces or special characters in your file and directory names: svn st | ack '^M' | cut -b 8- | cpio -pdmv backup This is cpio in pass-through mode (-p). It takes a list of filenames to copy from stdin. -d allows it to create directories, -m preserves modification times and -v makes it ...


1

You need a tool that can detect the codec in the m4a files. One such tool is avprobe which is available in debian based linuxes in package libav-tools (I use Ubuntu 14.04). Then you can do like this (if there are no newlines in file names..): find . -name \*.m4a | while read file; do avprobe "$file" 2>&1 |grep -q 'Audio: alac' && echo ...


1

Try the following command: ls -1Rhs | sed -e "s/^ *//" | grep "^[0-9]" | sort -hr | head -n20 It'll list top-20 biggest files in the current directory recursively. The command to work on OSX/BSD properly (as sort doesn't have -h), you need to install sort from coreutils package. Note: Option -h for sort is not available on OSX/BSD, so you've to install ...


1

You can also use the ls command instead of find command: ls /foot/bar/*.csv | xargs mv -t some_dir



Only top voted, non community-wiki answers of a minimum length are eligible