Search Results

Search: Posts Made By: ibad_urs
1,061
Posted By RudiC
Or even find * -maxdepth 1 -mtime -2 -exec echo...
Or even find * -maxdepth 1 -mtime -2 -exec echo mv {} "0"{} \;
1,061
Posted By RavinderSingh13
Hello, Following may help also, remove echo...
Hello,

Following may help also, remove echo after cross checking the output, if output is correct.


find * -maxdepth 1 -type d -mtime -2 -exec bash -c 'echo mv $0 "0"${0}' {} \;

...
1,875
Posted By Aia
FullBashGuide...
FullBashGuide (http://mywiki.wooledge.org/FullBashGuide)
Shell Scripting: Expert Recipes for Linux, Bash and more...
1,875
Posted By Akshay Hegde
Welcome to forums Classic Shell...
Welcome to forums

Classic Shell Scripting - O'Reilly Media (http://shop.oreilly.com/product/9780596005955.do)

http://www.tldp.org/LDP/Bash-Beginners-Guide/Bash-Beginners-Guide.pdf
2,868
Posted By Don Cragun
Try: #!/bin/bash keep_above=1 keep_below=1 ...
Try:
#!/bin/bash
keep_above=1
keep_below=1
# cleanup - rename selected directories and remove oethers
# Usage: cleanup file_to_rename...
#
# Select a list of all files in the current directory...
1,061
Posted By RudiC
Given all relevant directories only have...
Given all relevant directories only have alphanumeric characters in their names you might try this:find * -maxdepth 1 -mtime -2 | xargs -I{} echo mv {} 0{} Once happy with the result, remove the echo.
2,868
Posted By Don Cragun
Make a backup copy of the working script in case...
Make a backup copy of the working script in case your changes don't work; but don't be afraid to experiment with your code. If you're worried about messing up your directory hierarchy, remove the |...
2,868
Posted By Don Cragun
The script I gave you takes a list of directories...
The script I gave you takes a list of directories to rename as operands; not the name of a file containing a list of directories to rename.

Didn't the error message it gave you saying that...
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy