[solved]bash help please: sort files & recognize duplicates

Hi!
I'm trying to move/rename all files in a folder and its subfolder by age.  And move duplicate files somewhere else. The output looks mostly fine, the tmp files too... but I can't figure out, why the duplicate files handling isn't working. edit: the line that sets the new name (&& newname="$1/.dupes/$dname/$part1_$part2_$fname" \) just doesn't seem to get executed here...
#!/bin/bash
pushd "$1" && {
rafi="/tmp/$RANDOM.size.md5.list" && echo > "$rafi"
find $1 -type f -print0 | while read -d $'\0' file;
do \
fname=$(basename "$file")
dname=$(dirname "$file")
part1=$(stat -c%y "$file" | awk -F " |:|\\\.|-" '{printf $1"-"$2"-"$3}')
part2=$(stat -c%y "$file" | awk -F " |:|\\\.|-" '{printf $4"-"$5"-"$6}')
echo "$bname" | grep -q "$part1" && part1=""
echo "$bname" | grep -q "$part2" && part2=""
newname="$1/$part1/$part2_$fname"
size="size$(stat -c%s "$file")"
grep -q "$size" "$rafi" \
md5="md5$(md5sum -b "$file" | sed "s/ .*//")"
grep -q "$md5" "$rafi" \
&& newname="$1/.dupes/$dname/$part1_$part2_$fname" \
|| {
echo "$md5" >> "$rafi"
} || {
echo "$size" >> "$rafi"
newname=$(echo "$newname" | sed "s/\/\/*/\//g" | sed "s/\.~.~//g")
if [ "$newname" != "$file" ];
then if ! [ -d $(dirname "$newname") ]
then echo mkdir -p $(dirname "$newname") -v
fi
echo mv "$file" "$newname" -v --backup=numbered
fi
done
popd
What am I doing wrong? Been trying for hours - I just don't get it...
Thanks!
Last edited by whoops (2011-03-01 10:19:48)

thx, that brought me a little closer!
juster wrote:I don't usually say this for bash but your style is hard to read.
Oops... thought so - never had an easy time writing readable code. Or readable anything... Maybe this is not as bad:
#!/bin/bash
if pushd "$1"
then
# random tmp file for filesize + md5
rafi="/tmp/$RANDOM.size.md5.list" && echo > "$rafi"
# for all files in folder $1 + subfolders...
find $1 -type f -print0 | while read -d $'\0' file
do
fname=$(basename "$file")
dname=$(dirname "$file")
# Get year-month-day
part1=$(stat -c%y "$file" | awk -F " |:|\\\.|-" '{printf $1"-"$2"-"$3}')
# Get hour-minute-second
part2=$(stat -c%y "$file" | awk -F " |:|\\\.|-" '{printf $4"-"$5"-"$6}')
# Don't add this info to new filename if it is already in old filename
echo "$bname" | grep -q "$part1" && part1=""
echo "$bname" | grep -q "$part2" && part2=""
# Destination filename
newname="$1/$part1/${part2}_$fname"
size="size$(stat -c%s "$file")"
# have files with the same size already been processed?
if grep -q $size "$rafi"
then
md5="md5$(md5sum -b "$file" | sed "s/ .*//")"
# have files with the same md5 already been processed?
if grep -q $md5 "$rafi"
# set different destination for duplicate files
then newname="$1/.dupes/$dname/${part1}_${part2}_$fname"
# write md5 to tmp file
else echo $md5 >> "$rafi"
fi
# write size to tmp file
else echo "$size" >> "$rafi"
fi
# remove double slashes
newname=$(echo "$newname" | sed "s/\/\/*/\//g" | sed "s/\.~.~//g")
if [ "$newname" != "$file" ]
then if ! [ -d $(dirname "$newname") ]
then echo mkdir -p $(dirname "$newname") -v
fi
echo mv "$file" "$newname" -v --backup=numbered
fi
done
popd
fi
Renaming seems to work correctly now, but it's still only giving me one "dupe mv line" for my test in /etc/X11 and it's not giving me any for the many duplicates in my huge digicam folder.
$ sort_by_date /etc/X11/
~
mkdir -p /etc/X11/2011-02-27 -v
mv /etc/X11/xorg.conf.bak /etc/X11/2011-02-27/19-43-36_xorg.conf.bak -v --backup=numbered
mkdir -p /etc/X11/2010-06-21 -v
mv /etc/X11/xorg.conf.d/20-nvidia.conf /etc/X11/2010-06-21/10-12-35_20-nvidia.conf -v --backup=numbered
mkdir -p /etc/X11/2010-08-24 -v
mv /etc/X11/xorg.conf.d/10-evdev.conf /etc/X11/2010-08-24/15-45-35_10-evdev.conf -v --backup=numbered
mkdir -p /etc/X11/2010-09-01 -v
mv /etc/X11/xorg.conf.d/20-nvidia.conf.pacnew /etc/X11/2010-09-01/12-16-10_20-nvidia.conf.pacnew -v --backup=numbered
mkdir -p /etc/X11/2010-11-30 -v
mv /etc/X11/xorg.conf.d/20-keyboard.conf /etc/X11/2010-11-30/10-27-00_20-keyboard.conf -v --backup=numbered
mkdir -p /etc/X11/2010-05-26 -v
mv /etc/X11/xorg.conf.d/10-quirks.conf /etc/X11/2010-05-26/21-51-03_10-quirks.conf -v --backup=numbered
mkdir -p /etc/X11/2010-01-03 -v
mv /etc/X11/xorg.conf /etc/X11/2010-01-03/10-56-25_xorg.conf -v --backup=numbered
mkdir -p /etc/X11/.dupes/etc/X11 -v
mv /etc/X11/xorg.conf.dub /etc/X11/.dupes/etc/X11/2011-02-27_19-43-52_xorg.conf.dub -v --backup=numbered
mkdir -p /etc/X11/2010-07-10 -v
mv /etc/X11/Xsession /etc/X11/2010-07-10/20-01-30_Xsession -v --backup=numbered
mkdir -p /etc/X11/2010-12-22 -v
mv /etc/X11/xinit/xinitrc.d/30-dbus /etc/X11/2010-12-22/15-39-41_30-dbus -v --backup=numbered
mkdir -p /etc/X11/2010-11-28 -v
mv /etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module /etc/X11/2010-11-28/02-44-08_40-libcanberra-gtk-module -v --backup=numbered
mkdir -p /etc/X11/2010-12-19 -v
mv /etc/X11/xinit/xserverrc /etc/X11/2010-12-19/11-58-47_xserverrc -v --backup=numbered
mkdir -p /etc/X11/2010-11-15 -v
mv /etc/X11/xinit/xinitrc /etc/X11/2010-11-15/11-39-17_xinitrc -v --backup=numbered
~
Still don't get it where this problem could be coming from...
md5sum * 2>/dev/null | sort -k 1 | uniq -d -w 32 | cut -c 35-
That's beautiful, just I have no idea how to use it in the context of what I'm trying to do.
Last edited by whoops (2011-02-28 13:00:27)

Similar Messages

  • Help please missing files Lightroom.

    Hi I have just changed over from an old computer to a new tower-I copied over from old tower to new tower,using an external hard drive--When I set up to print from a photo in lightroom I get a message saying can`t find file
    I can`t find a way around this problem--Can somene Kindly Help Please.?
    Alfred UK.

    What OS are you on?
    First step: go to library, and make sure LR knows the location of your files. In grid form, a question mark will appear in the border. If you have masses of red folders, go to the highest level, and ask LR to locate it. (sorry forget the command just now, and I have to split now. Er, Jam. Uh, I have to leave the computer for a while..
    good luck

  • Help please, spacific file update only changed files when moved

    I record live bands and file size can be very large when i make changes to files i want to save time and resources by only updating what has changed without replacing the whole file. when moving files from desktop to external drive.
    say i have a file named "jam" that i add files to on my external drive then i copy it to my internal drive, do some edditing and add some files. when i move it back to external drive i want to update the "jam" file add the new files and changed files without having to keep track of the changed files and not transfer the files that havent changed. can anyone help?

    Only files and folders below directory "/emmc" will show up in windows explorer.
    You will also not be able to edit (add/delete) files to the /system/media/audio/notifications folder (or just about any folder above /emmc) . This is because you do not have administrator access (for lack of a better term) to the phone.
    So, if it's that important to you, you'll have to find a way to tell the phone you're an administrator
    Windows Explorer correctly identifies these as two separate drives. There is, after all, a built in drive as well as the swappable SDcard.
    Sorry I can't be of more help.

  • [SOLVED] bash help: rsync only if device mounted

    Hi,
    First bash-script here - the tldp.org-guide has gotten me somewhere already, but the final condition 'if rsync...' seems to fail and I don't know why. The script checks if the location to backup the files to is a mountpoint. If not, the script should mount it or die. If it is a mountpoint, rsync should be run.
    #!/bin/bash
    ## VARIABLES
    # Set location to backup from
    BACKUP_FROM="/srv/media/"
    # Set location to backup to
    BACKUP_TO="/media/backup/media/"
    BACKUP_DEV="e3434573-ad6f-4c44-8168-391292ba5ec5"
    BACKUP_MNT="/media/backup"
    # Log file
    LOG_FILE="/var/log/script_sync_media.log"
    ## SCRIPT
    # Check if the log file exists
    if [ ! -e $LOG_FILE ]; then
    touch $LOG_FILE
    fi
    # Check if the drive is mounted
    if [[ `! mountpoint -q $BACKUP_MNT` ]]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Backup device needed mounting!" >> $LOG_FILE
    # If not, mount the drive
    if [[ `mount -U $BACKUP_DEV $BACKUP_MNT` ]]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Backup device mounted." >> $LOG_FILE
    else
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Unable to mount backup device." >> $LOG_FILE
    exit
    fi
    fi
    # Start entry in the log
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Sync started." >> $LOG_FILE
    # Start sync
    if [[ `rsync -a --delete $BACKUP_FROM $BACKUP_TO` ]]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Sync completed succesfully." >> $LOG_FILE
    else
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Sync failed." >> $LOG_FILE
    fi
    # End entry in the log
    echo "" >> $LOG_FILE
    exit
    It is probably a trivial problem for a bash-professional? The log states 'Sync started.' and immediately 'Sync failed.'...
    Thx.
    Vincent
    Last edited by zenlord (2011-03-05 15:29:41)

    OK, a little bit later than I should have replied, but I have incorporated the tips provided above, and a few other changes:
    * added an extra check for the target dir
    * applied general exit codes
    * added unmount after running the script (which makes the earlier warning if the device nees to be mounted a little superfluous)
    Here goes:
    #!/bin/bash
    ## VARIABLES
    # Set source location
    BACKUP_FROM="/srv/media/"
    # Set target location
    BACKUP_TO="/media/backup/media/"
    BACKUP_DEV="xxxxxxx-xxxxx-xxxxxxxxxxxxxxx" #UUID of the disk
    BACKUP_MNT="/media/backup"
    # Log file
    LOG_FILE="/var/log/script_sync_media.log"
    ## SCRIPT
    # Check that the log file exists
    if [ ! -e "$LOG_FILE" ]; then
    touch "$LOG_FILE"
    fi
    # Check that source dir exists and is readable.
    if [ ! -r "$BACKUP_FROM" ]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to read source dir." >> "$LOG_FILE"
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to sync." >> "$LOG_FILE"
    echo "" >> "$LOG_FILE"
    exit 1
    fi
    # Check that target dir exists and is writable.
    if [ ! -w "$BACKUP_TO" ]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to write to target dir." >> "$LOG_FILE"
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to sync." >> "$LOG_FILE"
    echo "" >> "$LOG_FILE"
    exit 1
    fi
    # Check if the drive is mounted
    if ! mountpoint "$BACKUP_MNT"; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - WARNING: Backup device needs mounting!" >> "$LOG_FILE"
    # If not, mount the drive
    if [ mount -U "$BACKUP_DEV" "$BACKUP_MNT" ]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Backup device mounted." >> "$LOG_FILE"
    else
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to mount backup device." >> "$LOG_FILE"
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to sync." >> "$LOG_FILE"
    echo "" >> "$LOG_FILE"
    exit 1
    fi
    fi
    # Start entry in the log
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Sync started." >> "$LOG_FILE"
    # Start sync
    if rsync -a -v --delete "$BACKUP_FROM" "$BACKUP_TO" &>> "$LOG_FILE"; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Sync completed succesfully." >> "$LOG_FILE"
    else
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: rsync-command failed." >> "$LOG_FILE"
    echo "$(date "+%Y-%m-%d %k:%M:%S") - ERROR: Unable to sync." >> "$LOG_FILE"
    echo "" >> "$LOG_FILE"
    exit 1
    fi
    # Unmount the drive so it does not accidentally get damaged or wiped
    if [ umount "$BACKUP_MNT" ]; then
    echo "$(date "+%Y-%m-%d %k:%M:%S") - Backup device unmounted." >> "$LOG_FILE"
    else
    echo "$(date "+%Y-%m-%d %k:%M:%S") - WARNING: Backup device could not be unmounted." >> "$LOG_FILE"
    fi
    # End entry in the log
    echo "" >> "$LOG_FILE"
    exit 0
    Usage:
    1. c/p to a .sh-file
    2. Make the file executable (chmod +x <file>.sh)
    3. set an entry in crontab to run this script daily/weekly/monthly
    Maybe this little script helps other bash newbies...
    Last edited by zenlord (2012-09-23 21:08:32)

  • [SOLVED] bash and xterm - which files get read and referenced?

    I currently have my user shell set as /bin/sh (which, as I'm sure you are aware, is a symlink to bash). When I launch xterm, none of my config files seem to be read or sourced. If I login from the console, all is correct.
    According to the documentation I've read, when bash is invoked as sh, it should read /etc/profile, and then .profile, and finally .shrc (which is recommended to be explicitly sourced from .profile). I can see that /etc/profile is being read, as the PATH is being updated from items in /etc/profile.d, but none of my config files in ~ are being read.
    I put in a unique alias in each of .bash_profile, .bashrc, .profile, and .shrc to try to trace the files being read. In console, this reveals that .profile and .shrc are being read (as I would expect). But, in xterm, no aliases are being read.
    Also, PS1 is set to sh-4.2$ (literally set as '\s-\v\$ '). I have tried to grep that sequence in /etc, but that failed to hit on anything.
    I don't have my own .Xresources and nothing in .xinitrc redefines xterm behavior. The only switches I am explicitly sending to xterm redefine appearance (background/foreground color and font).
    The only other relevant piece of information I can think of is that I am using the slim login manager and in slim.conf it defines: login_cmd exec /bin/bash -login ~/.xinitrc %session. I changed that to /bin/sh, but it had no effect.
    Any ideas?
    Solution
    Adding
    XTerm*.LoginShell: True
    to ~/.Xdefaults will cause xterm to behave as expected.
    Last edited by archnet (2011-05-11 00:40:49)

    dmz wrote:
    To answer your actual question:
    strace -eopen xterm
    strace -eopen sh
    Here is the output:
    sh-4.2$ strace -eopen xterm
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/usr/lib/libXft.so.2", O_RDONLY) = 3
    open("/usr/lib/libXaw.so.7", O_RDONLY) = 3
    open("/lib/libncursesw.so.5", O_RDONLY) = 3
    open("/lib/libc.so.6", O_RDONLY) = 3
    open("/usr/lib/libfontconfig.so.1", O_RDONLY) = 3
    open("/usr/lib/libX11.so.6", O_RDONLY) = 3
    open("/usr/lib/libXmu.so.6", O_RDONLY) = 3
    open("/usr/lib/libXt.so.6", O_RDONLY) = 3
    open("/usr/lib/libICE.so.6", O_RDONLY) = 3
    open("/usr/lib/libfreetype.so.6", O_RDONLY) = 3
    open("/usr/lib/libXrender.so.1", O_RDONLY) = 3
    open("/usr/lib/libXext.so.6", O_RDONLY) = 3
    open("/usr/lib/libXpm.so.4", O_RDONLY) = 3
    open("/usr/lib/libz.so.1", O_RDONLY) = 3
    open("/usr/lib/libexpat.so.1", O_RDONLY) = 3
    open("/usr/lib/libxcb.so.1", O_RDONLY) = 3
    open("/lib/libdl.so.2", O_RDONLY) = 3
    open("/usr/lib/libSM.so.6", O_RDONLY) = 3
    open("/usr/lib/libXau.so.6", O_RDONLY) = 3
    open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
    open("/lib/libuuid.so.1", O_RDONLY) = 3
    open("/proc/meminfo", O_RDONLY) = 3
    open("/home/archnet/.Xauthority", O_RDONLY) = 4
    open("/home/archnet/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/locale/locale-archive", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 4
    open("/usr/share/X11/locale/locale.dir", O_RDONLY) = 4
    open("/usr/share/X11/locale/en_US.UTF-8/XLC_LOCALE", O_RDONLY) = 4
    open("/home/archnet/.Xdefaults-natoufa", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.Xdefaults", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/X11/app-defaults/XTerm", O_RDONLY) = 4
    open("/etc/ld.so.cache", O_RDONLY) = 4
    open("/usr/lib/libXcursor.so.1", O_RDONLY) = 4
    open("/usr/lib/libXfixes.so.3", O_RDONLY) = 4
    open("/home/archnet/.icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/xterm", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_v_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_h_double_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_up_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_down_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_left_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/home/archnet/.icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/icons/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/cursors/sb_right_arrow", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/pixmaps/default/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/dev/tty", O_RDWR) = 4
    open("/dev/ptmx", O_RDWR) = 4
    open("/home/archnet/.XCompose", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/share/X11/locale/compose.dir", O_RDONLY) = 5
    open("/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 5
    open("/usr/share/X11/XKeysymDB", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 5
    open("/usr/share/terminfo/x/xterm", O_RDONLY) = 5
    sh-4.2$ strace -eopen sh
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/lib/libreadline.so.6", O_RDONLY) = 3
    open("/lib/libncursesw.so.5", O_RDONLY) = 3
    open("/lib/libdl.so.2", O_RDONLY) = 3
    open("/lib/libc.so.6", O_RDONLY) = 3
    open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
    open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
    open("/proc/meminfo", O_RDONLY) = 3
    open("/etc/nsswitch.conf", O_RDONLY) = 3
    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/lib/libnss_files.so.2", O_RDONLY) = 3
    open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
    open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 3
    open("/home/archnet/.bash_history", O_RDONLY) = 3
    open("/home/archnet/.bash_history", O_RDONLY) = 3
    open("/usr/share/terminfo/x/xterm", O_RDONLY) = 3
    open("/etc/inputrc", O_RDONLY) = 3
    I don't see it attempting to read any sort of profile for shrc file.

  • HELP -- please --- Temp Files for Microsoft Word

    Please HELP -
    I believe I overwrote separate file with that of an older working document.  Is there a way I could find different versions of this document either in a TEMP file or some other way.  I am at the brink of crying.  Need to go see my boss soon and have to tell her the bad news.  

    Don't reboot...  Here is what I found for a PC...
    Re: retrieving previous versions of word files?
    yes you can, IF you haven't rebooted etc.  Did exactly that for my son the other day. Had accidentally wiped out all his homework. Found the .tmp hidden files in the same folder, renamed them to .doc, and was able to open and retrieve most of his work. I assume your hidden files are viewable?

  • HELP PLEASE - .dv file format not supported

    I am using Premiere Pro CS4.  I had it installed Windows XP, and my project was working fine.  Premiere read .dv files as well as others, but the OS was getting old so I upgraded to Windows 7.   Now I load the same project and Premiere does not recognize the .dv files.  I get the error that the .dv file format is not supported.  I thought this was supposed to be supported by premiere?  Do I need to download a codec or change settings, or will I have to convert all of the .dv files to another format?  If so, this will take a long time because I have lots of file clips in this project.  Thanks in advance.

    Thanks for all of the help.  I already basically understood what a codec was, although those articles did make it more clear.  I am still not quite sure how Premiere choses what codecs it will read.  I believe it has some codecs included with it.  I suppose the files I am trying to work with use other codecs.  What I am not sure of is how other programs can play these files and not premiere.  If these programs play the files, then that should mean the codecs are installed, so I dont see why premiere cant read them.
    None the less, I think my problem lies in the fact that I cannot find good codec installers for Windows 7.  I am going to try to dual boot my computer for the time and put CS4 back on the XP version where I think I can find the codecs that I need. 
    The only other option I can think of is to convert the files to formats that work with my Premiere on Windows 7.  If the MS AVI codec will work for sure, then does anyone know a good converter I can use, because this would work best.
    Last, not that premiere is on windows 7, the page up and page down buttons do not advance the timeline to the next cut, and the ctrl+D combo does
    not insert the default transition.  Does anyone know what to do to fix these small problems?
    Thanks again for all the help.

  • HELP PLEASE - Notes Files Disappeared

    I’m completely stunned.
    I just tried to look at one of my iPhone notes to pull up some important data and noticed that all but one of them are gone. Poof – vanished.
    I had spent hours entering this information – much of which I don’t have replicated elsewhere – thinking that the **** stuff would stay there on my phone (and backed up on my PC) until I edited or deleted them. Only to discover they can just magically disappear.
    If this is a synching issue, than that’s a problem. All the notes were painstakingly entered by hand on my phone. I’ve never entered any notes on my PC so there’s absolutely no reason why synching should EVER override or delete any of my Notes. No reason whatsoever!!
    I can’t begin to describe how livid I am that this could happen. I’m assuming that most people use Notes to store important information they want at their fingertips (confirmation numbers, flight information and frequent flyer numbers, etc.) Heck, I even had a notes page to record cute anecdotes related to my two little toddlers which I tend to quickly forget unless I jot them down right after they happen.
    Maybe this is something that’s easily restored, and if so, good job Apple, for at least ensuring that important data isn’t randomly lost. If on the other hand those programmers managed to F this one up and created a synching process that will randomly deletes important files for no good reason….. then that’s a fatal flaw in my book and I’ll be **** ****** I ever switched to an iPhone.
    And please don’t tell me that there’s a little pop-up that says some files will be modified or deleted when I synch. I expect files to be modified, deleted or overwritten when I synch, that's the way it should be. It should happen all the time, but ONLY when I actually modify or change or delete them. Not at random by a f’d up synching program.
    Sorry for my attitude, but as I mentioned earlier, I am stunned. It’s not the time (hours) that I invested putting all this important stuff into various iPhone notes files, it’s the fact that unless this information can be recovered somehow, much of that data will be irrecoverable.
    Since I haven't pulled up my Notes files in the last week or two, I have no idea when these files were erased. If anyone knows how I might locate and restore this data, please, please, please let me know.
    Thank you!!

    There is an enormous glitch with the manner that Notes are being synced between the iPhone & desktops. Or even Apple's own Mail. Even within Mail itself there are huge problems with the system. So I can only imagine the situation on your side.
    Excuse my language, but in essence, Apple is sodomizing it's users. For choosing to use Apple software & apps.
    How in **** do a whole bunch of simple notes suddenly duplicate themselves when all I did was move them between mailboxes? Then, when I delete the duplicates, how come everything disappears? When I manage to figure everything out, why does a sync with the iPhone not honour the changes?
    Wake up Apple engineers. This is not a small issue for the simple fact that Notes was touted as a big feature. So what happens when someone like CA2DC get royally screwed for simply choosing to trust your system?
    Dude, feedback through the iPhone or Apple website. Here is the link: http://www.apple.com/feedback/
    Your post will likely be ignored cause nobody has any idea why and how this is happening. I was lucky I had Time Machine and managed to restore the lost notes. All the best!

  • [SOLVED] sed help please...

    I'm trying to modify an XFWM theme, and need to run sed to replace colors with a phrase to make it "blend in" with the GTK theme. Unfortunately, it isn't working. Can anyone help?
    Here is what I am trying to run:
    sed -e 's/\#E6E6E6/\#E6E6E6 s active_color_2/g' *-active.xpm
    The result of that gives me something similar to running cat *-active.xpm.
    Last edited by smartboyathome (2009-03-25 21:49:53)

    the above should work but i'd script it:
    edit that, the above will work and will work better, faster and more efficiently...
    but i'd still script it
    #!/bin/bash
    find ./ -name '*-active.xpm' | while read file; do
    cp $file $file.orig
    cat $file | sed 's/\#E6E6E6/\#E6E6E6 s active_color_2/g' > temp
    mv temp $file
    done
    Last edited by brisbin33 (2009-03-25 21:39:20)

  • Help please - itunes wont recognize my phone (apple mobile device support)

    every time i plug my iphone 4 in i get the error message "this iphone cannot be used because the required software is not installed" and then advises me to uninstall and reinstall itunes.
    i have uninstalled (thoroughly, in the correct order) and reinstalled at least 30 times. the apple mobile device support is not installing. i'm running a laptop on windows vista. i've been into device management and the iphone (the driver being one for a camera) is there but amds isn't.
    i'm clueless. please help!

    Follow the directions here to restart the AMDS, if that doesn't work, follow the instructions at the end of this support document to reinstall the AMDS. Pay attention to the various steps, they MUST be done in a certain order:
    http://support.apple.com/kb/ts1567

  • [SOLVED] printer help please SOS HELP !!!!

    Recently, I wanted to print something, so I followed the instructions on installing a printer on arch wiki about cups. I followed every piece of instruction, but none did the trick. I even tried installing my printer from hp-toolbox, but it gave me and error saying printer queque failed. I have an HP photosmart c4400. It works for every other OS. Please help.
    Last edited by raj7095 (2010-02-16 22:36:37)

    Is this really so big of an "SOS HELP!!!!" that you need to bump it after 7 minutes? Good policy is to bump after 2 days, if you really can't find anything. Try to provide more information in posts or do more digging and state what you've tried  since the last post. http://wiki.archlinux.org/index.php/For … te#Bumping
    Where does it say "printer queque failed"? Did you really try everything on the wiki page about CUPS? My printer works fine but I don't have the same one as you. Does the wiki page say anything about blacklisting/rmmod-ing modules? I've seen that mentioned in other threads, but I don't know which module. Please wait for somebody that knows, I'm sure somebody can help.

  • Help with sorting files

    If anyone could give me a hand with this task it would be greatly appreciated:
    Situation:
    I have many albums that each have multiple discs. When I load my iPod it automatically shows each disc displayed as a separate ablum. I know I can group all the songs into the same album by editing the "info" and use the same album name for all the tracks (essentially deleting "[disc 1]" or "[disc 2]"). However, I want to create another sorting query so that after I click on the album title, another screen pops up that shows "Disc 1, Disc 2, Disc 3" and then I can click on each disc individually to view the tracks.
    Is this possible?

    there aren't really any problems just that instead of it showing under "Phish"
    LivePhish Vol. 7 (disc 1)
    LivePhish Vol. 7 (disc 2)
    LivePhish Vol. 7 (disc 3)
    I would like it to show:
    LivePhish Vol. 7 ...(which I can easily do by editing the info)
    then after you click on that it would show:
    Disc 1
    Disc 2
    Disc 3

  • Urgent help please - What files needed to compile servlets

    I am trying to compile some servlets but can't. I recently reformatted and forgot how I had configured Tomcat previously.
    What files do I need to compile servlets, and where do I have to save them etc.
    Thanks

    u will require jsdk.jar..
    put this in classpath and then compile ..it will surely compile
    and for compiling ...there is no configuration reqd in tomcat

  • I cannot upload an exel file from lap top to numbers in iPad, message says file not supported.   Any help please?

    I cannot upload an exel file from lap top to numbers in iPad, message says file not supported.   Any help please?

    File Sharing lets you transfer files between iPad and your computer. You can share files created with a compatible app and saved in a supported format.
    Apps that support file sharing appear in the File Sharing Apps list in iTunes. For each app, the Files list shows the documents that are on iPad. See the app’s documentation for how it shares files; not all apps support this feature.
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, select an app from the list on the left.
    On the right, select the file you want to transfer, then click “Save to” and choose a destination on your computer.
    Transfer a file from your computer to iPad:
    Connect iPad to your computer.
    In iTunes, select iPad in the Devices list, then click Apps at the top of the screen.
    In the File Sharing section, click Add.
    Select a file, then click Choose (Mac) or OK (PC).
    The file is transferred to your device and can be opened using an app that supports that file type. To transfer more than one file, select each additional file.
    Delete a file from iPad: Select the file in the Files list, then tap Delete.
    or use dropbox

  • When I delete com.apple.audio.SystemSettings.plist my audio/sound problems are solved. However when the file is replaced with another file, the sound is crappy and the quality is reduced. Can you please help me?

    When I delete com.apple.audio.SystemSettings.plist my audio/sound problems are solved. However when the file is replaced with another file, the sound is crappy and the quality is reduced. Can anyone please help me?
    Sincerely,
    Eric

    Run this when you have the problem and post the results here.
    EtreCheck
    This will tell us what is loaded

Maybe you are looking for