Tagged Questions
2
votes
4answers
433 views
chown all files based on file name pattern in current directory
I'm trying to chown all files whose filenames begin with ChownFileNames. I've used this command, but it doesnt seem to work:
find . -maxdepth 1 |grep 'ChownFileNames*' -exec chown hadoop:hadoop -- {} ...
3
votes
1answer
313 views
Export a m3u playlist to a directory in order they appear in the playlist
There is a way to rsync a m3u playlist into a destination directory.
How can I process the list and number the output so it orders the files to match the playlist order?
For example the m3u:
...
16
votes
7answers
20k views
Looping through files with spaces in the names?
I wrote the following script to diff the outputs of two directores with all the same files in them as such:
#!/bin/bash
for file in `find . -name "*.csv"`
do
echo "file = $file";
diff ...