[SOLVED] Question About Downgrading to a Spinning Drive from SSD

I currently have a laptop with an SSD and Arch Linux, and it's aligned specifically for SSD and configured as such. I ordered a brand new laptop, and decided that I will move the SSD from my current laptop to my new one, and put a spinning drive in my current laptop. I was thinking about using Clonezilla to clone my current Arch install on my current laptop SSD to a spinning drive (since I can't afford another SSD right now). However, since my current laptop installation is aligned for an SSD, will that cause problems if I clone it to a spinning drive? My spare spinning hard drives were made before the 4k transition, I believe. I would be putting it on an older 500GB Seagate. I'd rather not start over with a new configuration if I don't have to.
Last edited by jlacroix (2012-02-14 03:04:10)

graysky wrote:No need... Partition the new drive and just.use raync to transfer.  Clonezilla is overkill IMO.
The thing is, I'm very familiar with Clonezilla, I use it quite often. I'm not familiar with raync.
alphaniner wrote:
Sounds like a good oppurtunity to switch to LVM!
But, like graysky said, there's nothing to worry about.  The only way you would run into problems is if you tried to use dd.
I think that's what Clonezilla uses, isn't it?

Similar Messages

  • [SOLVED] Question about CPU temperature

    Hi everybody,
    I just want to ask a question about "standard" CPU temperatures because my laptop (a Dell Vostro 3700) is permanently hot with the fans on even when I am not doing anything special.
    I have CPU freq scaling active with the conservative governor, and I use Gnome Shell 3.2 with an nVidia using the nouveau driver.
    Here are "stable" temperatures while writing this post:
    # sensors
    acpitz-virtual-0
    Adapter: Virtual device
    temp1: +72.5°C (crit = +103.0°C)
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +78.0°C (high = +100.0°C, crit = +110.0°C)
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0: +73.0°C (high = +95.0°C, crit = +105.0°C)
    Core 2: +73.0°C (high = +95.0°C, crit = +105.0°C)
    And this is the output of mpstat
    # mpstat -P ALL
    Linux 3.1.6-1-ARCH (fm) 01/04/2012 _x86_64_ (4 CPU)
    10:16:50 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
    10:16:50 PM all 1.59 0.18 0.54 0.02 0.00 0.02 0.00 0.00 97.65
    10:16:50 PM 0 1.88 0.15 0.72 0.02 0.00 0.01 0.00 0.00 97.22
    10:16:50 PM 1 1.64 0.21 0.40 0.02 0.00 0.01 0.00 0.00 97.73
    10:16:50 PM 2 1.47 0.15 0.67 0.02 0.00 0.06 0.00 0.00 97.64
    10:16:50 PM 3 1.36 0.20 0.39 0.02 0.00 0.01 0.00 0.00 98.01
    The fan, of course, is full speed (very annoying)
    I think that these temperatures are quite high, but I don't know what's really causing all this heating because my laptop is basically idle.
    Any suggestion?
    Thanks.
    P.S.: Running Linux fm 3.1.6-1-ARCH #1 SMP PREEMPT Thu Dec 22 09:11:48 CET 2011 x86_64 Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz GenuineIntel GNU/Linux
    Last edited by fm (2012-01-06 09:32:01)

    samuvuo wrote:
    fm wrote:Just to wrap up this topic, I "solved" the issue by adding these parameters to the kernel:
    Just curious: what are the temperatures now? Sensors output after the "fix" would be nice.
    It's in the previous posts:
    Before (idle)
    # sensors
    acpitz-virtual-0
    Adapter: Virtual device
    temp1: +72.5°C (crit = +103.0°C)
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +78.0°C (high = +100.0°C, crit = +110.0°C)
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0: +73.0°C (high = +95.0°C, crit = +105.0°C)
    Core 2: +73.0°C (high = +95.0°C, crit = +105.0°C)
    After (idle)
    acpitz-virtual-0
    Adapter: Virtual device
    temp1: +63.5°C (crit = +103.0°C)
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +68.0°C (high = +100.0°C, crit = +110.0°C)
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0: +62.0°C (high = +95.0°C, crit = +105.0°C)
    Core 2: +64.0°C (high = +95.0°C, crit = +105.0°C)
    After (after playing 8 min youtube video)
    acpitz-virtual-0
    Adapter: Virtual device
    temp1: +74.5°C (crit = +103.0°C)
    nouveau-pci-0100
    Adapter: PCI adapter
    temp1: +78.0°C (high = +100.0°C, crit = +110.0°C)
    coretemp-isa-0000
    Adapter: ISA adapter
    Core 0: +73.0°C (high = +95.0°C, crit = +105.0°C)
    Core 2: +75.0°C (high = +95.0°C, crit = +105.0°C)
    Fan spinning is better (less noisy) after specifying the kernel parameters.
    Thanks
    Last edited by fm (2012-01-06 13:43:05)

  • [SOLVED] Question about resolv.conf

    I successfully configured my Arch box with a static IP by following the instructions on the Arch wiki page here but had a couple of questions about configuring /etc/resolv.conf:
    1) What is the proper way to obtain the domain name that should be inserted into resolv.conf?
    2) What exactly is this domain name used for?  I read the man page but still don't really understand it.  Why do I need a domain name if I already have a working set of nameservers to resolve IP addresses?
    EDIT: @ewaller Yes I edited the OP because I realized that my original problem was that I just hadn't added a domain name in my resolv.conf file.  I edited my original post because 1) the instructions are already posted clearly on Arch Wiki so my post really wouldn't be beneficial and 2) so I could ask my real question without making other people waste their time reading through my other nonsense
    Last edited by choogi (2010-09-09 04:06:45)

    yejun wrote:You can just use public dns like 8.8.8.8 or 4.2.2.1. There's no other way to get dnsserver besides dhcp.
    Yes, I know how to get a nameserver, but I'm asking about the domain name that goes in resolv.conf.  The Arch wiki tutorial for setting up static IP uses the following resolv.conf as an example:
    nameserver 61.23.173.5
    nameserver 61.95.849.8
    search example.com
    My question has to do with what the "search example.com" does.  I don't have a domain name associated with my machine, but if I remove that line, then I get "web page unavailable" when I try to load any web site, which suggests that I'm not connecting to any nameservers right?

  • [SOLVED] Question about GCC error messages.

    I'm currently taking a course in C programming, and I have  a question about the error messages returned by GCC.
    When ever i try to compile a program containing syntax errors, i get cryptic and not very helpfull error messages.
    If i try to compile:
    #include <stdio.h>
    int main(void)
    int i;
    i = 0
    return 0;
    I get following from GCC:
    error.c: In function â:
    error.c:8:2: error: expected â before â
    But shouldn't the message be something like:
    error.c: In function 'main':
    error.c:8:2: error: expected ; before 'return'
    or am I mistaken?
    /AcId
    Last edited by AcId (2010-10-13 17:48:19)

    Woah. That is very strange. I've never seen that before.
    I assume you're using Arch Linux. What text editor did you use to write the code? Which terminal application are you using?
    ...those questions are probably unrelated to the problem, but we might as well get them out of the way.

  • [Solved] Questions about Arch on T420s

    Hello everybody,
    I'm relatively new to Arch and switched from Ubuntu last year. Since then I've learned a lot about Linux in general due to the great documentation provided by the Arch community.
    I've managed to install Arch on my Thinkpad T420s with an UEFI Setup using Archboot. But still there are open questions.
    My first question is about the UEFI System partition and grub2. Should the UEFI partition be mounted to the filesystem? What about updating Grub2 (eg for setting boot parameters) when the UEFI System partition is not mounted to the filesystem. Up to now I've set boot parameters by manually mounting the UEFI partition and editing the Grub2's menu.lst equivalent. I think this is not optimal.
    My second question is about some graphical artifacts in Gnome 3. The T420s uses Intel HD 3000 Graphics. Sometimes icons in nautilus disapear or get replaced by black planes when hovering over them with the mouse cursor. Similar black planes replacing icons can be observed sometimes in Evolution or Rhythmbox. Furthermore gnome-terminal becomes transparent sometimes when I'm scrolling or switching between powertop2 tabs. Anyone else observed similar issues on their T420s or on other models with an Intel HD 3000? I use several options for the i915 driver but none of them seem to be related to the graphical artifacts. Furthermore I've disabled dVT in the BIOS.
    options i915 modeset=1
    options i915 i915_enable_rc6=1
    options i915 i915_enable_fbc=1
    options i915 lvds_downclock=1
    options i915 semaphores=1
    My last question is about the USB ports on my T420s. I've 3 USB ports, one on the left side (USB2.0) and two (USB3.0 and another USB2.0) on the back side. When I plug in a HD on the left side everything works fine and the filesystem is automatically mounted. When I plug in the same HD on the ports of the back side the HD isn't even recognized. Interestingly when i boot with the HD plugged into the back side ports everything works fine. Can you point me any directions how to solve this problem?
    Hopefully sombody using Arch on a T420s has already solved these issues and could share the solutions. Otherwise I would be grateful for any suggestions.
    Sincerely yours,
    Tobsen
    Last edited by tobsen (2012-02-09 17:15:27)

    Hi Tobsen, I have a T420 also. Perhaps my experiences will be some help?
    Regarding the USB ports: I installed Arch on my T420 with the Kernal 3.0.3 snapshot and all the USB ports worked out of the box. That sounds like a problem with udev to me, though. Have you checked the wiki article on this?
    Regarding the graphical artifacts: For me, when a popup window appears from hovering the mouse over an icon, the window is sometimes blank grey. It's totally inconsistent, and I can fix it by just hovering over it again, so I haven't really bothered to examine the source of the problem. Could this be related to your problem with the GPU? I figured it was a problem with the windows manager I'm using (Enlightenment e17), which is unstable.
    Regarding UEFI: I don't use GRUB2, so this may not be good advice, but I personally feel like you should avoid auto-mounting partitions you don't always need. It slows down boot, and if the partition is mounted, user error could damage it. I say you should keep doing what you're doing.

  • *Solved* Question about ATI Drivers

    Ok, I'm just finished installing, and I know most distro's, ask you to remove the open source drivers, before adding in FGLRX  drivers.  Looking at the wiki, I didn't noticed if this needed to be done, and after going through the install, I rebooted.  It went as planned until kdm went to load.  The screen was unreadable.  I used the cd media to mount root, and removed catalyst, and re-installed the opensource drivers.  All is well atm, so I'm trying to figure out what I missed.  My question atm though is during the FGLRX install, it ask's if you want to removed the opensource drivers due to conflict.  If I hit yes, will pacman it automatically remove the required drivers, or do I need to manually remove the Fx86 drivers on my own?
    I do apologize for not having a /etc/X11/xorg.conf report, as it slipped my mind while fixing everything. I'll try to make a better habbit of getting it made. I did do a aticonig --inital before the reboot, so i know it won't that.
    If I missed anything on the wiki, please let me know, I'll look again at it after dinner.
    Thank you all for  your time in the matter.
    Last edited by bigcountryva (2012-09-30 01:01:49)

    Silex89 wrote:
    Hi there
    First off, which installation method are you following? (ABS using the AUR package, the unofficial repository or the AMD installer). Depending on which method you use, you'll have (or not) a resolved dependency. For instance, you have to remove both the open source driver and your former xorg.conf file (safer is to back it up) to be able to install Catalyst with the AMD's site installer.
    If you use AUR (with a tool like Yaourt for example) or the repo method, pacman/yaourt should do it for you, but in a lot of cases it doesn't (I switched to Catalyst having my OpenBox session built already, so when I tried to remove the open source driver it complained about all of the apps that I had installed for removing a dependency like libgl or mesa) and you'll have to do a pacman -Rdd xf86-video-ati to make it work
    I'm wondering if you remembered to add the mkinitcpio hook (which is needed to make Catalyst work).
    What I would suggest is to re-read the wiki page for Catalyst, see if your card is still supported by Catalyst, maybe your card needs Catalyst-Legacy...
    Best of Luck with that
    I figured it out, and got it working.  I had a typo adding the module for flgxr driver.  Fixed it and a soft boot later, all is well.  I also deicided to make it so I have to "startx" into my gui, incase this happens again, I won't need the installation media.  Thanks for the input.

  • A few questions about setting up a network drive

    Hello,
    I have been trying setup a private server on my home network. I have a Netgear WNDR 3800 and have been trying to hook up my 2TB external drive to the router.
    I have been trying to decide how I want to format the drive, and how many partitions I should use.
    The reason I have a 2TB drive is because I needed a work space to create a image of a corrupt 500GB drive. The 500GB drive had my entire digital life on it, and it was almost lost. I dont want to encounter the same issue with a 2TB drive because at that point I feel like any issues would make it difficult for me to recover the data due to work space size issues. This is why I am thinking about using several partitions, but I am not sure what issues this might present.
    As far as format goes; the router says it supports read/write with FAT 16/32, NTFS, EXT 2/3, and I know it works with HFS. Here are the things that I am trying to do with the drive. (in order of importance)
    Use it as a Time Machine backup location for 1 possible more MBP's
    As a media sever to stream downloaded movies and music to A/V reciever (Pioneer VSX-822)  and possibly other devices on the network
    Act as a temporary storage location to swap files between devices or operating systems
    If possible not keep media on my computer and stream it from the network drive when I am home
    And, thats all I can think of right now. If there is something else useful I am missing that would need special attention in setting up a network drive let me know.
    So, I have had no problems getting the drive to connect and show up on the network when I use HFS. I have also been able to get multiple partitions to show up; been able to back up to different partitions; including time machine on one partition.
    So here is where I am running into problems; the router bios allows you to enable a media sever. I believe the router tries to do something with DLNA. DLNA I believe allows for a similar functions to airplay and cloud for basically all compatible non apple products. I dont care if I use DLNA, or Airplay. I just want to be able to access my music library over the network without having to have my computer open, or my iphone on me..ect.
    So I was wondering if anyone could help me out, or if there are any articles I should look at that I might have missed while I have been researching.
    Edit: I am sorry if this is posted in the wrong section, I figured the best people to ask about filesystem compatability and ease of use was going to be the System software section

    Hello,
    I have been trying setup a private server on my home network. I have a Netgear WNDR 3800 and have been trying to hook up my 2TB external drive to the router.
    I have been trying to decide how I want to format the drive, and how many partitions I should use.
    The reason I have a 2TB drive is because I needed a work space to create a image of a corrupt 500GB drive. The 500GB drive had my entire digital life on it, and it was almost lost. I dont want to encounter the same issue with a 2TB drive because at that point I feel like any issues would make it difficult for me to recover the data due to work space size issues. This is why I am thinking about using several partitions, but I am not sure what issues this might present.
    As far as format goes; the router says it supports read/write with FAT 16/32, NTFS, EXT 2/3, and I know it works with HFS. Here are the things that I am trying to do with the drive. (in order of importance)
    Use it as a Time Machine backup location for 1 possible more MBP's
    As a media sever to stream downloaded movies and music to A/V reciever (Pioneer VSX-822)  and possibly other devices on the network
    Act as a temporary storage location to swap files between devices or operating systems
    If possible not keep media on my computer and stream it from the network drive when I am home
    And, thats all I can think of right now. If there is something else useful I am missing that would need special attention in setting up a network drive let me know.
    So, I have had no problems getting the drive to connect and show up on the network when I use HFS. I have also been able to get multiple partitions to show up; been able to back up to different partitions; including time machine on one partition.
    So here is where I am running into problems; the router bios allows you to enable a media sever. I believe the router tries to do something with DLNA. DLNA I believe allows for a similar functions to airplay and cloud for basically all compatible non apple products. I dont care if I use DLNA, or Airplay. I just want to be able to access my music library over the network without having to have my computer open, or my iphone on me..ect.
    So I was wondering if anyone could help me out, or if there are any articles I should look at that I might have missed while I have been researching.
    Edit: I am sorry if this is posted in the wrong section, I figured the best people to ask about filesystem compatability and ease of use was going to be the System software section

  • Question about LaCie 500GB external hard drives

    Are the LaCie external 500GB hard drives actually 2 hard drives inside the case or just 1? Are they good?
    I read a review that the larger LaCie external hard drives often fail and are not as reliable as the samller ones (like 300GB). Is this true?
    G5 Dual 2.3 GHz   Mac OS X (10.4.6)  

    Hi Tim,
    I have an external LaCie Porsche Design 500Gb drive, and it is definately only one drive. LaCie's spin down when not in use, which some external drives don't. Spinning down extended the lifespan, so I doubt there will be problems because of it.

  • Question about MyVegas games continually spinning out of control

    Windows 7
    flashplayer version 16,0,0,235
    Google Chrome
    MyVegas games will not stop spinning most of the time. Checked updates etc. all else works fine. Anyone else having same problem? All posts greatly appreciated.

    Please ask your question on a forum for the Flash Player

  • [SOLVED] Question about Feh

    I installed feh to use as a file browser image launcher (https://wiki.archlinux.org/index.php/Fe … e_Launcher) and as a desktop wallpaper manager (https://wiki.archlinux.org/index.php/Fe … er_manager), but it seems that I each time must use "sudo" for this. Therefore I think the script from the wiki page will not launch in Thunar and that the wallpaper will not load on start up in i3. In order to do this, I think I must add my user to a group, but I'm not sure which one or if it is the right way to solve it. Would you please assist me with this and thank you in advance.
    Last edited by rayanamukami (2014-04-26 09:32:36)

    Thank you for your advice, I should not use sudo as often as I do.
    In Thunar opening an image with the feh_browser.sh script gives the following message.
    Failed to execute application "feh_browser.sh".
    Failed to execute child process "/home/kohaku/feh_browser" (Permission denied).
    For the wallpaper, I followed the wiki page about i3 (https://wiki.archlinux.org/index.php/I3 … _wallpaper). The following command gives the following message.
    $ feh --bg-scale /path/to/image.file
    feh WARNING: /home/kohaku/.feh/wallpaper/touhou.png - No read access
    feh ERROR: Unable to load image /home/kohaku/.feh/
    I have added
    exec --no-startup-id sh ~/.fehbg
    to
    ~/.i3/config

  • [SOLVED] Question about bash

    The default .bashrc file looks like this. When installing rvm I noticed that it is not sourcing scripts under /etc/profile.d.
    # ~/.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    alias ls='ls --color=auto'
    PS1='[\u@\h \W]\$ '
    I just solved my issue by adding the following code to .bashrc. I was just wondering if this should be done by default perhaps in the package that installs /etc/skel/.bashrc?
    if [ -f /etc/profile ]; then
    . /etc/profile
    fi
    Last edited by MikeW (2014-11-12 05:28:25)

    Seems that it is an rvm issue. After a bit of searching for rvm problems I found this post that gave me the rvm specific solution. This is probably the preferred fix since its just rvm that's the issue here.
    http://askubuntu.com/questions/40287/et … ng-sourced
    The key is serveral posts down...
    Installing RVM as multiuser requires the user to run this command:
    echo '[[ -s "/etc/profile.d/rvm.sh" ]] && . "/etc/profile.d/rvm.sh" # Load RVM function' >> ~/.bashrc
    So I can remove the /etc/profile bit now. Thanks for stearing me in the right direction to fix this.

  • [SOLVED] Question about clipping

    Hello,
    I'm using JOGL and I have question. When the camera gets close to my test-house, JOGL automaticly clips parts of the house. Have a look at [this image|http://img194.imageshack.us/img194/6236/clipping.png] to see what I mean.
    My question: How to prevent that clipping? I don't want it to clip...
    Thanks,
    Matt
    EDIT: Solved it myself, I had to lower the perspective lower-limit (gluPerspective)

    See my first post.

  • [SOLVED] Question about "loadkeys" from the install procedure

    https://wiki.archlinux.org/index.php/In … ard_layout
    https://wiki.archlinux.org/index.php/Be … the_keymap
    # loadkeys ro_win
    They show up as black squares... Even after generating these locales, as per the Beginner's Guide:
    [root@archiso ~]# locale-gen
    Generating locales...
    en_US.UTF-8... done
    ro_RO.UTF-8... done
    ro_RO.ISO-8859-2... done
    Genetation complete.
    What do?
    PS: I noticed that they're activated with "Alt+Shift". There's no mention in the Install Guide or Beginner's Guide about this. Heh.
    Last edited by DSpider (2012-08-24 14:45:34)

    From the LiveCD (in VirtualBox):
    # nano x
    <wrote these characters>
    # cat x | curl -F "sprunge=<-" http://sprunge.us
    And they show up fine: http://sprunge.us/MKBj
    ăîşţâ
    ĂÎŞŢÂ
    Until a better explanation comes along, I've added this info to the BG:
    Don't worry if some of the letters show up as white squares or as other symbols. It's probably just the console font missing those glyphs. The glyph codes are correct and if you press the correct keys they will show up fine when (or if) you set up a graphical environment later.
    https://wiki.archlinux.org/index.php/Be … the_keymap
    I guess I can mark it as solved...

  • [SOLVED]Questions about a shell program and about shell: files, regexp

    Hello, I'm writing this little program in shell:
    #!/bin/bash
    # Synopsis:
    # Read from an inputfile each line, which has the following format:
    # lllnn nnnnnnnnnnnnllll STRING lnnnlll n nnnn nnnnnnnnn nnnnnnnnnnnnnnnnnnnn ll ll
    # where:
    # n is a <positive int>
    # l is a <char> (no special chars)
    # the last set of ll ll could be:
    # - NV
    # - PV
    # Ex:
    # AVO01 000060229651AVON FOOD OF ARKHAM C A S060GER 0 1110 000000022 00031433680006534689 NV PV
    # The program should check, for each line of the file, the following:
    # I) If the nn of character lllnn (beggining the line) is numeric,
    # this is, <int>
    # II) If the character ll ll is NV (just one set of ll) then
    # copy that line in an outputfile, and add one to a counter.
    # III) If the character ll ll is NP (just one set of ll) then
    # copy that line in an outputfile, and add one to a counter.
    # NOTICE: could be just one ll. Ex: [...] NV [...]
    # [...] PV [...]
    # or both Ex: [...] NV PV [...]
    # Execution (after generating the executable):
    # ./ inputfile outputfileNOM outputfilePGP
    # Check the number of arguments that could be passed.
    if [[ ${#@} != 3 ]]; then
    echo "Error...must be: myShellprogram <inputfile> <outputfileNOM> <outputfilePGP>\n"
    exit
    fi
    #Inputfile: is in position 1 on the ARGS
    inputfile=$1
    #OutputfileNOM: is in position 2 on the ARGS
    outputfileNOM=$2
    #OutputfilePGP: is in position 3 on the ARGS
    outputfilePGP=$3
    #Main variables. Change if needed.
    # Flags the could appear in the <inputfile>
    # ATTENTION!!!: notice that there is a white space
    # before the characters, this is important when using
    # the regular expression in the conditional:
    # if [[ $line =~ $NOM ]]; then [...]
    # If the white space is NOT there it would match things like:
    # ABCNV ... which is wrong!!
    NOM=" NV"
    PGP=" PV"
    #Counters of ocurrences
    countNOM=0;
    countPGP=0;
    #Check if the files exists and have the write/read permissions
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]; then
    #Read all the lines of the file.
    while read -r line
    do
    code=${line:3:2} #Store the code (the nnn) of the "llnnn" char set of the inputfile
    #Check if the code is numeric
    if [[ $code =~ ^[0-9]+$ ]] ; then
    #Check if the actual line has the NOM flag
    if [[ $line =~ $NOM ]]; then
    echo "$line" >> "$outputfileNOM"
    (( ++countNOM ))
    fi
    #Check if the actual line has the PGP flag
    if [[ $line =~ $PGP ]]; then
    echo "$line" >> "$outputfilePGP"
    (( ++countPGP ))
    fi
    else
    echo "$code is not numeric"
    exit
    fi
    done < "$inputfile"
    echo "COUN NON $countNOM"
    echo "COUN PGP $countPGP"
    else
    echo "FILE: $inputfile does not exist or does not have read permissions"
    echo "FILE: $outputfileNOM does not exist or does not have write permissions"
    echo "FILE: $outputfilePGP does not exist or does not have write permissions"
    fi
    I have some questions:
    I) When I do:
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]; then
    else
    echo "FILE: $inputfile does not exist or does not have read permissions"
    echo "FILE: $outputfileNOM does not exist or does not have write permissions"
    echo "FILE: $outputfilePGP does not exist or does not have write permissions"
    fi
    I would like to print the things on the else, accordingly, this is, print the right message. Ex: if "$outputfileNOM" did not have the write permission, just print that error. BUT, I don't want to put a lot of if/else, Ex:
    if [[ -r $inputfile ]]; then
    if [[-w $outputfileNOM ]] then
    else
    For the READ permission, and the other for the WRITE
    Is there a way to do it, without using a nesting approach, and that maintains the readability. 
    II) About the:
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]
    is OK if I use the flag "-x" instead of -r or -w. I don;t have a clear definition of what is the meaning of:
    -x FILE
    FILE exists and execute (or search) permission is granted
    III) Notice the ATTENTION label in my code. I notice that there are some possibilities, for ex: having white spaces before, after or before or after. I'm believing in the consistency of the input files, but if they change, it will explode. What could I do in this case? Is there an elegant way to manage it? (exceptions?)
    Thank you very much!
    EDIT: corrected what rockin turtle wrote bellow about the format. Thank you.
    Last edited by gromlok (2011-10-09 18:39:03)

    I) Regarding your if statement, you could do something like this:
    estr='FILE: %s does not exist or does not have %s permissions.\n'
    [ -r $inputfile ] || ( printf "$estr" "$inputfile" "read" && exit 1 )
    [ -w $outputfileNOM ] || ( printf "$estr" "$outputfileNOM" "write" && exit 1 )
    [ -w $outputfilePGP ] || ( printf "$estr" "$outputfilePGP" "write" && exit 1 )
    II)The -r/-w/-x mean that the file has the read/write/execute bit set. Do a
    $ man chmod
    for details.
    III) You should be able to do
    if [[ "$line" =~ .*\<NV\> ]]; then
    echo "..."
    (( countNOM++ ))
    fi
    but that didn't work for me when I tried it.  I don't know if this is a bug in bash, or (more likely) something that I am doing wrong.
    Regardless, I would write your script like this:
    #!/bin/bash
    file=$(egrep '^[A-Z]..[0-9]{2}' "$1")
    grep '\<NV\>' <<< "$file" > "$2"
    grep '\<PV\>' <<< "$file" > "$3"
    echo 'Count NON:' $(wc -l < "$2")
    echo 'Count PGP:' $(wc -l < "$3")
    Note: In reading your script, your comments imply that each line of the input file starts with 'llnnn' but the example line you gave starts with 'lllnn'.  That is, there are 3 letters (AVO) followed by 2 numbers (01). The above script assumes that lines start with 'lllnn'

  • [SOLVED]Questions about e17-svn

    I installed e17-svn and e17-extra-svn from commouty repo,it's beautiful...and buggy.It creates several desktop icons for my partitions,i deleted that from Desktop and .e/e/fileman/favorites folder,but they appear again the next time i login.Firefox and thunar freeze many times as well,and the most unacceptable thing is that i can't logout,every time i try logout,the e17 hangs there forever and i have to restart x myself.I use kdm4 as the login manager,and i try slim as well,the problem remain.Anybody knows how to solve those problems?Thanks.
    Last edited by ashunter (2008-08-24 22:15:34)

    WTF, Something weird going on here.  It used to be #pacman -S e-cvs and you got a perfectly useable e17 desktop.  I just tried to #pacman -S e17-svn and it says no such package or group so there must be some changes goin' on as a #pacman -S e-cvs gets you nowhere now.  Be patient, though--I say to myself
    I'll bet pressh is on the job!  Hmmm... I don't recall seeing any announcement about a big change in getting enlightenment in arch.  Maybe I missed something?
    Edit:  I guess I did miss something.  Searching the forums brings me this: http://wiki.archlinux.org/index.php/E17 from a post in 2008-07-03 http://bbs.archlinux.org/viewtopic.php?id=51202
    I'm beginning to feel like Rip Van Winkle
    Edit:  I just did a #pacman -Syu on my x86_64 machine and it asked if I wanted to replace e-cvs with e-svn stuff so I did and sofar no probs.  Sorry ashunter, you might have other issues.  I use gdm on my desktop and slim on my laptop and no probs logging in or shutting down here.
    Last edited by bgc1954 (2008-08-23 16:26:10)

Maybe you are looking for

  • How do I change the Serial Number in Logic Studio?

    Hi All, I used a friends copy of Logic Studio and the serial number to give Logic Studio a try, loved it, and bought it. However now I have my own serial number and would like to enter it into Logic. Logic, of course, has kept the first serial number

  • Adobe Reader XI will not open any PDF file

    I have tried removing and reloading reader.  I have also tried using the WIndows Control Panel to repair the Adobe file.  Nothing has helped.  I cannot open Adobe Reader XI directly from the programs folder.  Nor will it open any PDF file when I doub

  • Only one root tag is allowed.

    I'm trying to run the following (from Flex 2.0 Online help) : <?xml version="1.0"?> <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"> <mx:XML id="capitals" format="e4x"> <Capitals label="U.S. State Capitals"> <capital label="AL" value="Mont

  • How to close my Apple account???

    Hi there, I'm just wondering if there is a way to fully close my Apple Discussions account, and whether it can be trickled down to all other Apple accounts which I have under the same user id? cheers

  • N9 looks great - Why did Nokia go with Symbian 3 a...

    Hi I've had the N8 for a year now and I'm pretty tired of certain aspects of it while I really like some. my biggest gripe is the general slow and laggy performance of the device while I love the design and Nokia's great support for non major languag