• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

The "Linux questions (and other stuff)" thread

I'd suggest first looking at the options for mv:

Code:
man mv

Once you see what your choices are, you can decide what you want to do. For example, do you want it to work interactively? Do you want to see the files' names as they're being moved? Etc.

Read its man page and then post again if you need help figuring out how to do what you want.

One practice that I often preach but don't practice myself :eek: is to keep the source file(s) until you're sure that they all made it to their destination intact. So instead of mv, you might do a cp, check to see that the files are there, and then rm the source files. This takes longer and requires more disk space (which may be a problem if your reason to move the files is a full disk). But it's the safest way to do it.


going with daemon's post I looked at mv but wasnt sure would rsync be better than cp? or am i thinking to much?
 
Upvote 0
if i wanted to wait for a few days to have discs delivered then i would not be concerned with an 8 hour download...

I'm not concerned about 8 hour downloads myself, set the download going, usually bittorrent, go to bed, sleep 8 hours, or go to work for the day, download is finished. :) Plus the idea of getting CDs or DVDs shipped from the US or EU to China, could be expensive and lengthy. Plus I don't have a CD or DVD drive anyway. Even if the download took two weeks, it would still be quicker than posting discs here.
 
Upvote 0
i would rather hotspot hop until i find a free spot that is much faster (one is only four miles from me, another at Target, and so on) than waste eight hours and be unable to do anything else online during that time. and if the download fails....like it did on my Android phone (angry still as i was 98% done! now it just says 'download interrupted cannot resume')
 
  • Like
Reactions: mikedt
Upvote 0
going with daemon's post I looked at mv but wasnt sure would rsync be better than cp? or am i thinking to much?
Choices, choices. :D

Any of them will work. Personally, I would--and I do--use mv. I normally use it in its default mode, which is silent (i.e., no visual output), but sometimes I'll add its -v argument so I can see the files' names as they're being moved.
 
Upvote 0
just an update on my fsck issue. all the lockups, boot loops and various other errors were related to my root filesystem being stuck in read-only mode. for some reason the 'auto' fsck check would lock the system up, hard booting needed which would just keep it mounted read-only. what i had to do was cancel auto-fsck and drop to a manual recovery shell, entered fsck -C /dev/sda1 and it fixed everything. my hard drive was not bad or faulty, just some 'inodes' out of place ;)
 
  • Like
Reactions: Speed Daemon
Upvote 0
It's been a while, but I've seen that happen with widgets in the past, and I honestly can't recall actually SOLVING the problem--instead I just deleted them from my panel. *shrug*

I just tried Nick's nixie clock widget for KDE Plasma, didn't work for me either. "Script initialization failed.", and I do have the required Python dependencies installed. This is on KDE 4.8.5. deleted it....*shrug* LOL.

Here's the widget's homepage:
http://opendesktop.org/content/show.php?content=100937
Seems to have been last revised March 2009. Possibly a revision to KDE broke it.
 
  • Like
Reactions: nickdalzell
Upvote 0
Actually i did not 'tinker' the problem happened when i installed Kubuntu Desktop. when i shut it down (it did perform a proper shutdown) and turned it back on, it got stuck at the Kubuntu screen (the graphic logo) and i force shut down (which is likely what caused the file system to be 'unclean' to begin with) and had been cancelling the auto-fsck because it would always freeze. eventually it got to a point that cancelling it was not enough, and i had to hit 'i' for 'ignore errors' (fsck would terminate and say filesystem still had errors) and it apparently only mounted root read-only. otherwise other than random bugs it would boot up, browse the web and so on. (the Compiz effects i posted in Show your Desktop were accomplished even though the FS was read-only) but i could not access terminal, or install anything. i had to find out myself how to dump it into a recovery shell (this used to happen automatically long ago???) and manually fsck it and fix it

i am not sure if it is the framebuffer or what, but IF i boot up and have the graphical Kubuntu loading animation the computer WILL freeze. i still need to hit escape for verbose mode
 
Upvote 0
if i let fsck continue and scan it will scan, say checking inodes, etc. then all of a sudden (can't see the text before it does) reboot, and do the same thing. says 'filesystem was uncleanly mounted, check forced' and just do it over and over. i used to just hit C to cancel, but doing that just freezes the system. if i hit C for cancel and I to ignore, it cancels the disk check and everything is fine. is there anything i can edit in /etc/fstab to get rid of fsck so i can just do it in a terminal?
Strange.

Assuming that the filesystem has always been OK and no data has been lost or mangled, then the init script (or whatever replaces init in your distro) that checks for the dirty bit and runs fsck must be wrong. I suppose that you can edit it. I can't think of anything that would leave the dirty bit set on a clean shutdown or reboot.

Editing /etc/fstab will not help; you need to find the boot script that's malfunctioning. On my own (OpenSUSE) system, I did a `grep fsck /etc/rc.d/*' (all of my init scripts are in that directory) and saw several likely culprits:

Code:
me@mypc:~> grep fsck /etc/rc.d/*
/etc/rc.d/boot:if rc_cmdline forcefsck > /dev/null || test -e /forcefsck ; then
/etc/rc.d/boot.cleanup:# Required-Start:    boot.rootfsck
/etc/rc.d/boot.cleanup:         rm -f /tmp/.X*lock /var/spool/uucp/LCK* /var/log/sa/sadc.LOCK /fsck_corrected_errors
/etc/rc.d/boot.clock:# Required-Start:    boot.rootfsck boot.udev
/etc/rc.d/boot.clock:# Required-Stop:     boot.rootfsck
grep: /etc/rc.d/boot.d: Is a directory
/etc/rc.d/boot.device-mapper:# Required-Start:    boot.udev boot.rootfsck
/etc/rc.d/boot.dmraid:# Required-Start:    boot.udev boot.rootfsck
/etc/rc.d/boot.dmraid:# Required-Stop:     boot.udev boot.rootfsck
/etc/rc.d/boot.klog:# Required-Start:    boot.rootfsck
/etc/rc.d/boot.localfs:# Required-Start:    boot.udev boot.rootfsck
/etc/rc.d/boot.localfs:# to get max number of parallel fsck processes
/etc/rc.d/boot.localfs: # do fsck and start sulogin, if it fails.
/etc/rc.d/boot.localfs:            # skip fsck if running on battery
/etc/rc.d/boot.localfs:     if test -f /forcefsck -o "$DO_FORCEFSCK" = "yes" ; then
/etc/rc.d/boot.localfs:     # If we use a serial console, don't use the fsck progress bar
/etc/rc.d/boot.localfs:     fsck $FSCK_OPTS
/etc/rc.d/boot.localfs:         echo "fsck succeed, but reboot is required."
/etc/rc.d/boot.localfs:         echo "fsck failed for at least one filesystem (not /)."
/etc/rc.d/boot.localfs:         > /fsck_corrected_errors
/etc/rc.d/boot.localfs: rm -f /etc/nologin /nologin /fastboot /forcefsck /success
/etc/rc.d/boot.localnet:# Required-Start:    boot.rootfsck
/etc/rc.d/boot.lvm:# Required-Start:    boot.udev boot.rootfsck
/etc/rc.d/boot.md:# Required-Start:    boot.udev boot.rootfsck
/etc/rc.d/boot.rootfsck:# /etc/init.d/boot.rootfsck
/etc/rc.d/boot.rootfsck:# Provides:          boot.rootfsck
/etc/rc.d/boot.rootfsck:# to get max number of parallel fsck processes
/etc/rc.d/boot.rootfsck:        # fsck may need a huge amount of memory, so make sure, it is there.
/etc/rc.d/boot.rootfsck:        # do fsck and start sulogin, if it fails.
/etc/rc.d/boot.rootfsck:        if test -f /forcefsck -o "$DO_FORCEFSCK" = "yes" ; then
/etc/rc.d/boot.rootfsck:                        # skip fsck if running on battery
/etc/rc.d/boot.rootfsck:            # If we use a serial console, don't use the fsck progress bar
/etc/rc.d/boot.rootfsck:                    fsck $FSCK_OPTS $ROOTFS_BLKDEV
/etc/rc.d/boot.rootfsck:                    echo "fsck succeed, but reboot is required."
/etc/rc.d/boot.rootfsck:                    echo "fsck failed.  Please repair manually and reboot. The root"
/etc/rc.d/boot.rootfsck:                test $FSCK_RETURN -gt 0 && > /fsck_corrected_errors
/etc/rc.d/boot.rootfsck:                echo '*** ERROR!  Cannot fsck because root is not read-only!'
/etc/rc.d/boot.rootfsck:        echo -n "Checking if boot.rootfsck has run"
/etc/rc.d/boot.swap:# Required-Start:    boot.rootfsck $local_fs
/etc/rc.d/rc:    if rc_cmdline forcefsck > /dev/null ; then
grep: /etc/rc.d/rc0.d: Is a directory
grep: /etc/rc.d/rc1.d: Is a directory
grep: /etc/rc.d/rc2.d: Is a directory
grep: /etc/rc.d/rc3.d: Is a directory
grep: /etc/rc.d/rc4.d: Is a directory
grep: /etc/rc.d/rc5.d: Is a directory
grep: /etc/rc.d/rc6.d: Is a directory
grep: /etc/rc.d/rcS.d: Is a directory
I don't use any dm or md RAID, LVM or other fancy stuff, so my most likely culprit would be /etc/rc.d/boot.rootfsck if I was having that problem. Your results may vary. The first step is finding the exact place where your boot scripts are stored.
 
Upvote 0
going with daemon's post I looked at mv but wasnt sure would rsync be better than cp? or am i thinking to much?
I use rsync to update large nested directory structures with lots of files, like my `music' and `Pictures' directories; that's where it works best. You can use rsync to replace cp if you're copying over a network that's prone timeouts or anything that would interrupt a file copy, like over the Internet with cheap ADSL connections at both ends. The difference with rsync is that it checksums each file to ensure that it's the same at both ends. If you value your data, doing things like "copy then delete" and using rsync instead of cp can help protect your files so they don't get lost or corrupted when you move them.
 
  • Like
Reactions: argedion
Upvote 0
i would rather hotspot hop until i find a free spot that is much faster (one is only four miles from me, another at Target, and so on) than waste eight hours and be unable to do anything else online during that time. and if the download fails....like it did on my Android phone (angry still as i was 98% done! now it just says 'download interrupted cannot resume')
That's a situation where rsync can be a big help. If you lose your connection at 98%, rsync will pick up right where it left off. You'd need shell access to the host that you're connecting to (or rsyncd running), which isn't always the case. However some public download servers offer the rsync protocol. Alternately you can use a FTP client with a "resume" mode.
 
Upvote 0
Speed that download was via Android 2.3 using Dolphin Browser. it was not running from a *Nix box. for some reason if the phone phantom booted (twice it did that the first two attempts, the 3G keeps causing a random kernel panic, never happens in EDGE) or if the download was failed in any way (i live in a fringe 3G area, so it often drops out a lot) it would never resume. last i recalled, that is the whole point of a download manager--to resume failed or interrupted downloads. but i am not sure why it would not let me restart the failed download. it had the progress still stuck a 98% but Android would always say the same error--'Download interrupted. it cannot be resumed'

back to the fsck issue, when i looked in my /etc/fstab file, it did have a 'errors--remount ro' in the spot where it normally has the permissions (the 0 and 1) and since i was stuck in read-only i couldn't edit or save the file, just look at it. i couldn't even change the permissions manually. i had to dump into a recovery shell and do a fsck -C /dev/sda1 to scan and fix the errors before it would turn me loose and allow read/write access. the AUTO fsck that begins during system boot is bullocked. it is fine if the system is clean, but if it tries an auto-scan due to that 'dirty' bit it will freeze. i have to still hit C for cancel, and M for manual recovery to scan the system properly if the issue comes up again. if only there was some way to have it automatically dump me into a recovery shell when it is dirty again so it would not need lightning reflexes to catch the specific parts where i must hit C and M (it is a very fast boot). i mean Linux has for years, since my experience in BasicLinux, auto dumped into recovery shell if there was anything wrong and fsck saw a problem.
 
Upvote 0
Speed that download was via Android 2.3 using Dolphin Browser. it was not running from a *Nix box.
Yes it was! Android runs on Linux, and there is an rsync client for Android. I have it on my phone and tablets, and use it to get media files from my Linux box.

i live in a fringe 3G area, so it often drops out a lot
You might want to think about getting a cellular booster amplifier for your phone. Wilson Electronics makes a nice, inexpensive "cradle" model that works with any phone (doesn't require an antenna jack) and gives close to the maximum legal power to the antenna. The base model (there are 4G versions too) costs less than $100US, and if you spend a little extra for a good rooftop antenna and low loss RF cable to connect the two, you can see the fastest data rates possible. Although it's a mobile device, it can be used at home with a 12V DC power supply.

back to the fsck issue, when i looked in my /etc/fstab file, it did have a 'errors--remount ro' in the spot where it normally has the permissions (the 0 and 1) and since i was stuck in read-only i couldn't edit or save the file, just look at it.
What you need is one of the several excellent rescue discs that can be used to boot the computer without using the Linux system installed on your HD. I prefer SystemRescueCD, but others like Parted Magic and even Knoppix (a full live distro) will work well. Some distros' install disc can also be booted into a recovery mode as well.

Just boot from the disc (or USB drive with the ISO image) and use the fsck on the boot disc to check, and hopefully repair the affected filesystem(s). Once you can run fsck without any errors, you can then mount the filesystem with /etc in it, and edit /etc/fstab (or copy fstab.bak to fstab if there is one) to restore normal operation.

If the filesystem has been damaged enough to corrupt crucial files, you may need to reinstall the OS. I've done this plenty of times (with my /home directory on a separate partition, of course) with no problems, but it can't hurt to make a backup. The rescue disk will allow you to copy your user directory to a spare disk or computer.
 
Upvote 0
my last experience with KDE was back in Red Hat 7 on a bought disk set of the OS with every package possible at time of release (7 discs plus two for source code!) and it was downright primitive. other than the KDE theme and gear icons it looked indistinguishable from the GNOME it also came packaged with. it resembled the Default look of KDE 4. Windows 95-ish. the cool stuff is in the widgets and other myriad of desktop options. i installed Cairo Dock to replace the panel, use a few widgets, and went all out on the Compiz stuff. Being the Star Trek nut i themed Firefox in LCARS, installed an LCARS program to play with/use as screensaver, changed the default event sounds to Majel Barrett Roddenberry's computer voice samples, etc. there was also an LCARS-themed KDE load screen :)
 
Upvote 0
Just installed fedora 18 atm i'm running kde. Havent ran that in for ever just thought I would check it out.
I hadn't run Fedora in a long time, but gave it a try in 2011 just for fun. I believe it was Fedora 16 (I have the disc around here somewhere, but I'm too lazy to look for it). I liked it, a lot, but ended up going back to my usual choice, Kubuntu, for that particular laptop.
 
  • Like
Reactions: argedion
Upvote 0
looks like i still got a bug with auto-fsck. even a proper shutdown and reboot will make it try and scan claiming it was umounted dirty--but it was a PROPER shutdown. there must be a bug in the kernel that keeps unmounting it wrong on shutdown. i just disabled the auto crap.

/dev/sda1 was uncleanly unmounted, check forced

*FREEZE* (just sits there indefinitely.)

i was able to edit the /etc/fstab file with a sudo gedit command. it would seem THIS distro still looks at that file to determine whether or not to scan.
 
Upvote 0
looks like i still got a bug with auto-fsck. even a proper shutdown and reboot will make it try and scan claiming it was umounted dirty--but it was a PROPER shutdown. there must be a bug in the kernel that keeps unmounting it wrong on shutdown. i just disabled the auto crap.

/dev/sda1 was uncleanly unmounted, check forced

*FREEZE* (just sits there indefinitely.)
I've only skimmed most of the posts about this issue, but the conclusion I've come to is something I almost NEVER recommend. I believe Speed has already touched on it. I think doing a clean reinstall might be the solution here. :eek:

As I said, I almost never suggest this, as reinstalling the OS is just something that rarely needs to happen with *nix. But it seems that something(s) got so messed up somewhere along the way on your system that wiping it and starting fresh might be the best approach.

If you decide to do that, I'd recommend doing it with Kubuntu itself, rather than starting with Ubuntu and then adding KDE and Kubuntu components. Last time, you had already installed Ubuntu so it made sense to do it that way to try KDE, but now that you know you like it better, start fresh with Kubuntu from the get go.
 
Upvote 0
isn't reinstalling something that happens to Microsoft Windows?

I will reiterate--it's been like this since day ONE. it is like my hard disk is not working correctly with it. i do know the hard disk is NOT bad. it is a brand new laptop. what i do know is going on, is when i shut the system down, it is NOT unmounting the file system, therefore it is no different than had i held down the power button and forced it off. so this causes the auto-fsck to think the system was unclean and force a disk check. so long as there are no errors, i can easily skip it and go about my day. if not, i can force a recovery shell, complete the scan myself and fix any file system errors. what i cannot do, however, is let it auto scan. if i let it auto-fsck it will freeze. every. time.

it took me hours to get what i got set up. it was a pain in the arse to install Star Trek Online. it was a 4.5 GB download. i am NOT about to mess that up by a reinstall.
 
Upvote 0
isn't reinstalling something that happens to Microsoft Windows?
Yes. Which is why I said that reinstalling the OS is something that rarely needs to happen with *nix. But, sometimes, it may be called for. In my experience, that's most likely to occur right after it's been installed and, for whatever reason(s), something(s) got corrupted/screwed up. Instead of trying to find and fix the problems--which is certainly doable--it might just be easier to reinstall the OS.

I will reiterate--it's been like this since day ONE. it is like my hard disk is not working correctly with it. i do know the hard disk is NOT bad. it is a brand new laptop. what i do know is going on, is when i shut the system down, it is NOT unmounting the file system, therefore it is no different than had i held down the power button and forced it off. so this causes the auto-fsck to think the system was unclean and force a disk check. so long as there are no errors, i can easily skip it and go about my day. if not, i can force a recovery shell, complete the scan myself and fix any file system errors. what i cannot do, however, is let it auto scan. if i let it auto-fsck it will freeze. every. time.
Which reinforces my feeling that a clean reinstall might be the remedy here.

it took me hours to get what i got set up. it was a pain in the arse to install Star Trek Online. it was a 4.5 GB download. i am NOT about to mess that up by a reinstall.
How did you partition the disk? If you did it in the 'best practices' sort of way, you should have the OS installed on its own, separate / (root) partition, a separate partition for /home, some swap space, and perhaps some other partition(s) for data, downloads, whatever. If you did it this way, and assuming that you have not placed downloaded files on your root partition (and, therefore, won't lose those when you format /), reinstalling the OS will not affect anything in your /home partition, including STO (which I believe you're running via wine, correct? so its files are in your ~/.wine directory). If you decide to reinstall, choose to format / and NOT format /home. That way you won't lose anything except system files and software you've installed, for example, via Synaptic, that placed the files in /usr/games, /usr/local, etc. But you can reinstall those later. Any data should be on your /home partition and will be safe.

(Of course I always recommend doing a backup first. Personally, I have never lost any data after decades of doing clean installs (which I prefer when upgrading), but no one can guarantee anything. Better safe than sorry.)
 
Upvote 0
When ever i install a system i never format /home however i do have a current backup of it. The only time I lost something it was my own fault. Or it was a Windows thing and we wont go there. However unlike windows reinstalling a Linux doesn't have to be a headache it can be done fairly simply and guess what not formatting home will keep all your settings :thrasher:
 
Upvote 0
i got the entire disk devoted to root. or /. there is no swap space as i got 4GB of RAM. i never run out of RAM and while it is running it works well. great, in fact. it is specifically how it tries unmounting the system when shut down. or some feature say maybe APM is preventing auto-fsck to work correctly. i found workarounds but no real fixes. nothing else is wrong with it.

could having the file system set to Ext2 vs Ext4 be a problem? honestly i have never noticed a single difference one way or the other in terms of stability or performance

for the record, this bug happens on both laptops. one running Kubuntu, (just got done installing it at home), and my STO computer running Ubuntu w/ Kubutu-desktop. both have auto-fsck failures. both won't unmount the root file system properly on shutdown. so the issue is not with one computer. i installed via two different disks too. when i view the kernel output on shutdown (i prefer verbose, it's fun watching it scroll on the screen) it never even mentions unmounting filesystems. not once. it does have a 'fail' flag on some kernel msg daemon but that is it

both have SATA hard drives, perhaps i got them configured for IDE or something?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones