Search Results

Search: Posts Made By: pasc
3,610
Posted By Don Cragun
With the shell in busybox you should be able to...
With the shell in busybox you should be able to do something like:
cnt=1
for x in *.gif
do base="${x%.gif}"
echo mv "$x" "$(printf '%s_%04d.gif' "$base" $cnt)"
cnt=$((cnt +...
4,385
Posted By Corona688
You've specified 3 decimal digits, but the gifs...
You've specified 3 decimal digits, but the gifs in question have 4 digits, followed by an underscore. I think %%04d_.gif might be what you need.
5,282
Posted By DGPickett
Less is more:while read x do find...
Less is more:while read x
do
find /var/mobile -maxdepth 2 -name "$x" >> "$x".txt
done < /var/mobile/names.txt
5,282
Posted By DGPickett
while read x do ....$x... done <file
while read x

do
....$x...
done <file
3,628
Posted By ygemici
find /var/mobile/Media/Downloads/ -name "*.deb" |...
find /var/mobile/Media/Downloads/ -name "*.deb" | xargs -I {} dpkg -x {} {}.xfind /var/mobile/Media/Downloads/ -name "*.deb" | xargs -I {} dpkg -e {} {}.x/DEBIAN
3,628
Posted By ahamed101
are you sure you are executing the same code...
are you sure you are executing the same code ygemici gave you?...
Try this...
find /dir/ -name "*.deb" | xargs -I {} dpkg -x {} {}.x

--ahamed

PS: I am away from my unix box so the code is not...
3,628
Posted By ygemici
a little correction ;) find /dir/ -name "*.deb"...
a little correction ;)
find /dir/ -name "*.deb" -exec dpkg -x '{}' \;
3,628
Posted By ahamed101
find /dir/ -name "*.deb" -exec dpkg -x {} /; ...
find /dir/ -name "*.deb" -exec dpkg -x {} /;


--ahamed
3,628
Posted By robo
find /dir/ -name *.deb -exec dpkg -x {} /; ...
find /dir/ -name *.deb -exec dpkg -x {} /;


try this i havenot tried but just trying to help you
3,171
Posted By zedex
assuming ignore list is created with ignore...
assuming ignore list is created with ignore extensions on each line .. like suggested by Chubler_XL.. here is my take.. i directly writing here so there can be syntactical error.


$ cat...
3,171
Posted By Chubler_XL
You could use rsync Just put list of...
You could use rsync

Just put list of exclude patterns in a file eg /tmp/nosync.txt

*.mp3
*.mp4
*.sav


Now run
rsync -axv --exclude-from=/tmp/nosync.txt --dry-run /source/top/dir /dest...
6,054
Posted By ahamed101
Try this... find . ! -wholename "*.mp3" !...
Try this...


find . ! -wholename "*.mp3" ! -wholename "*.MP3" -delete


--ahamed
6,054
Posted By jim mcnamara
find Music -type f \( ! -name '*MP3' -a ! -name...
find Music -type f \( ! -name '*MP3' -a ! -name '*mp3' \) -exec rm {} \;
13,259
Posted By ctsgnb
when "find *.deb ..." expand the wildcard '*' ...
when "find *.deb ..." expand the wildcard '*'

a "test.deb" is found but this is not a directory, so "find" cannot perform the search in it
3,072
Posted By tukuyomi
DIR='/var/mobile/Media/My Music/' will do. ...
DIR='/var/mobile/Media/My Music/' will do.

You can write this script in a new script, of course:
(Call it for this example "pause.sh")
#!/bin/sh

get_size(){ du -s "$1" 2>/dev/null | awk...
3,072
Posted By tukuyomi
Yes, unless, for example, you're talking about...
Yes, unless, for example, you're talking about /var/mobile in the system root, in which case you'll issue DIR='/var/mobile', as ~ denotes your Home directory
3,072
Posted By tukuyomi
#!/bin/sh DIR=~/'unix.com' get_size(){...
#!/bin/sh

DIR=~/'unix.com'

get_size(){ du -s "$1" 2>/dev/null | awk '$0=$1';sleep 5;}

# Script does its stuff

dir_size=$(get_size "$DIR")
while [ "$(get_size "$DIR")" -ne "$dir_size" ];...
3,072
Posted By tukuyomi
Try this: #!/bin/sh DIR=~/'unix.com' ...
Try this:
#!/bin/sh

DIR=~/'unix.com'
dir_size=0;

get_size(){ du -s "$1" 2>/dev/null | awk '$0=$1';}

while [ : ]; do
# Script does its stuff
sleep 5
while [ "$(get_size "$DIR")" -ne...
1,697
Posted By getmmg
This snippet below should do the job for you.. ...
This snippet below should do the job for you..


perl -ane 'BEGIN{@arr=("1234","5678","91011","1213");$i=0;$total=scalar(@arr)-1;$str} if($_=~/\/(\w+\-\w+\-\w+\-\w+\-\w+)/)
{if($curr ne...
1,697
Posted By getmmg
This should do the the job looks kind of messy...
This should do the the job looks kind of messy though..


perl -ane 'BEGIN{@arr=("1234","5678","91011","1213");$i=0;$total=scalar(@arr)-1;$str...
1,697
Posted By getmmg
Tell me if my undestanding is correct, For ex...
Tell me if my undestanding is correct,
For ex I1=12,I2=23,I3=34,I4=45,I5=56 is the key.

When the pattern with N-N-N-N-N is found
do you want to replace it with I1-I2-I3-I4-I5?

or First...
17,750
Posted By mirni
You can shut up the error messages by sending...
You can shut up the error messages by sending them to the black hole sink /dev/null:

mv src dest 2> /dev/null
2,158
Posted By bartus11
x=`head -1 /var/mobile/RELINKING.txt`; perl -pse...
x=`head -1 /var/mobile/RELINKING.txt`; perl -pse '$n++<3 && s#file://localhost/.*/Documents/#$x#' -- -x=$x Bookmarks.plist
Change red "3" to the number of occurences you want to replace (assuming...
2,158
Posted By bartus11
x=`head -1 /var/mobile/RELINKING.txt`; sed...
x=`head -1 /var/mobile/RELINKING.txt`; sed "s#file://localhost/.*/Documents/#$x#" Bookmarks.plist
2,158
Posted By bartus11
Try: sed...
Try: sed 's#file://localhost/.*/Documents/#whatever#' Bookmarks.plist
Showing results 1 to 25 of 26

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