All Questions
11
questions
1
vote
1
answer
45
views
Recursive rename with negate filter not working
I want my script to recursively rename all .mov files to _Proxy.mov, BUT I also want it to SKIP any files already named _Proxy.mov. The below command is still renaming all .mov files, and is ignoring ...
1
vote
2
answers
670
views
recursive grep does not list matches from some files
I am using GNU grep 3.4 to find scripts that contain a certain pattern. For this, I call grep recursively like so
grep -rin . -e "pattern"
The pattern is just a word, no regular expression....
0
votes
1
answer
83
views
The -r flag for directories seems to be useless now [closed]
cp, scp, rm and other command needs to the -r flag to perform an action on a directory, compared to just a file.
can't copy a directory because WHOOPS you forgot the -r flag
I don't feel this is ...
0
votes
1
answer
197
views
Copy files from folders which contain less than a number of files
Coming from Bash: Find folders with less than x files
find . -type d -exec sh -c 'set -- "$0"/*.flac; ! [ -e "$1" ]' {} \; -print
How do I extend the line to now recurse through the resulting list ...
4
votes
3
answers
8k
views
bash: find and zip all subfolders of a folder
how would one find all subfolders of a folder and zip them separately ?
folder structure
./folder
-subfolder_1
-subfolder_2
-subfolder_3
expected result:
./folder
-...
0
votes
2
answers
2k
views
Why does `rm -rf`` silently fail?
[EDIT]
Please don't waste your time reading my question below. It turns out my colleague is an idiot.. :)
On my server I'm trying to remove a folder and all its subfolders with the usual rm -rf ...
1
vote
2
answers
2k
views
Tail and grep recursively?
Trying to tail though a list of domains to search for a hacker code. All the files that I'm looking for are the same so I was trying something like this:
grep -rnl * -e "Ai9LbaFz7lC13SwzDxAYT72vwA"
...
4
votes
1
answer
2k
views
How do you remove nested empty directories using a Bash script on Linux?
I want to be able to run a script that will remove all my empty directories. The problem is some of them are nested, i.e. directories that only have empty directories in them, so the script needs to ...
3
votes
3
answers
912
views
Why doesn't this for loop work?
This is on Ubuntu 12.04 I'm trying to figure out how to get ffmpeg to do a batch conversion of FLACs to MP3, recursively. If I cd into a directory and use
for f in *.flac; do ffmpeg -i "$f" -c:a ...
5
votes
1
answer
1k
views
How to chown large group of files based on previous owner id?
I created a new account in OS X and disposed of my old one.
I have a bunch of files that now have owner 501 that need to have ownership changed to me
[/usr/local]$ ll
total 24
drwxrwxr-x 18 root ...
22
votes
3
answers
17k
views
Recursive ls with conditions
Why can't I use a command like this to find all the pdf files in a directory and subdirectories? How do I do it? (I'm using bash in ubuntu)
ls -R *.pdf
EDIT
How would I then go about deleting all ...