• 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

You have to decide which but manager you want to use; grub is usually easier (and more forgiving).

I like to put it into it's own /boot directory on the primary (bootable) drive. Once you have grub working correctly to boot Ubuntu, you may have to do a repair of the Windows mbr by using a recovery disc, going to command line and doing fixboot /bootrec and fixboot /mbr.

That is, of I recall correctly...
 
  • Like
Reactions: Rxpert83
Upvote 0
How do you print a list of files in a directory? I have a collection of videos from Youtube - mostly scientific/educational documentaries - that I want to catalog and check for duplicates.
I stick all downloads in a new folder each time, and I'd like to print out those contents.

I've searched, and a lot of the answers are for a different distro or from earlier than 2010!

I've got Mint 14.

Would be nice if you could just copy and paste as a list, but you can't.

Thanks
 
Upvote 0
How do you print a list of files in a directory? I have a collection of videos from Youtube - mostly scientific/educational documentaries - that I want to catalog and check for duplicates.
I stick all downloads in a new folder each time, and I'd like to print out those contents.

I've searched, and a lot of the answers are for a different distro or from earlier than 2010!

I've got Mint 14.

Would be nice if you could just copy and paste as a list, but you can't.

Thanks

[HIGH]cd /path/to/files
ls > ~/list.txt[/HIGH]

Use your favorite text editor to check manually for duplicates (I don't know of another way)
 
Upvote 0
[HIGH]cd /path/to/files
ls > ~/list.txt[/HIGH]Use your favorite text editor to check manually for duplicates (I don't know of another way)

If they are the exact same files with only different names, you could do something with hashing kinda like this:

Code:
cd /my/dir/here; for line in $( ls ); do md5sum $line; done| cut -d" " -f1 | uniq -u

I didn't put too much time in this, but it *should* output only unique hashes from the files in the /my/dir/here directory... which should give you an idea of how many duplicates you have...

or you could just end before the pipe and see all files (including duplicates -again based only on hashes- )

:/
 
  • Like
Reactions: palmtree5
Upvote 0
OK, I feel a little silly having to ask, but the man pages and Google haven't been much help, so:

I've been using rsync to copy some files from my Linux workstation to my NAS boxes that are running Linux as their OS. For whatever reason, the switches that normally get rsync to preserve file ownership and permissions aren't working, so I installed Enable root SSH and have been using chown and chmod to fix them.

Here's the head-scratcher, I'm seeing the usual permissions on the directories that I copied over, but on the ones that were made (presumably) by ReadyDLNA on the NAS boxes show a "+" that I can't clear.

Here's an actual screen scrape taken in the default `/c/data' directory:

Code:
drwxrwxrwx   7 nobody  nogroup  4096 2013-04-08 12:00 .
drwxrwxrwx   6 root    root     4096 2013-01-24 05:52 ..
drwxr-xr-x+ 11 myname users    4096 2013-03-13 18:54 Music
drwxr-xr-x+ 31 myname users   12288 2013-03-13 19:02 Pictures
drwxr-xr-x   4 myname users    4096 2013-04-08 12:00 TiVo
drwxr-xr-x   5 myname users    4096 2013-04-08 23:24 Video
drwxr-xr-x+  5 myname users    4096 2013-03-13 19:05 Videos

IIRC the original user/group for the + directories was `nobody nogroup'. Precisely what is the "+" used for, and how can I manipulate it?
 
Upvote 0
OK, I feel a little silly having to ask, but the man pages and Google haven't been much help, so:

I've been using rsync to copy some files from my Linux workstation to my NAS boxes that are running Linux as their OS. For whatever reason, the switches that normally get rsync to preserve file ownership and permissions aren't working, so I installed Enable root SSH and have been using chown and chmod to fix them.

Here's the head-scratcher, I'm seeing the usual permissions on the directories that I copied over, but on the ones that were made (presumably) by ReadyDLNA on the NAS boxes show a "+" that I can't clear.

Here's an actual screen scrape taken in the default `/c/data' directory:

Code:
drwxrwxrwx   7 nobody  nogroup  4096 2013-04-08 12:00 .
drwxrwxrwx   6 root    root     4096 2013-01-24 05:52 ..
drwxr-xr-x+ 11 myname users    4096 2013-03-13 18:54 Music
drwxr-xr-x+ 31 myname users   12288 2013-03-13 19:02 Pictures
drwxr-xr-x   4 myname users    4096 2013-04-08 12:00 TiVo
drwxr-xr-x   5 myname users    4096 2013-04-08 23:24 Video
drwxr-xr-x+  5 myname users    4096 2013-03-13 19:05 Videos

IIRC the original user/group for the + directories was `nobody nogroup'. Precisely what is the "+" used for, and how can I manipulate it?
That's a good one! I don't recall ever seeing the plus sign before. However, my good friend Google led me to this page which I think will help you out, at least as a starting point. Seems to have something to do with ACLs (access control lists).
 
Upvote 0
That's a good one! I don't recall ever seeing the plus sign before. However, my good friend Google led me to this page which I think will help you out, at least as a starting point. Seems to have something to do with ACLs (access control lists).
Thanks! I had a feeling it was an ACL thing. Since I've never had much need to use Linux ACLs, that's one area that I've been deficient in. Now it looks like setfacl is just the ticket for setting default permissions on directories, so I don't have to hand-edit them every time I add files. Sweet! :thumb:
 
Upvote 0
Ah, you're welcome. :)

I had a feeling it was an ACL thing. Since I've never had much need to use Linux ACLs, that's one area that I've been deficient in.
I can top that--I had to look up what ACL was! Being a sports fan, I only knew that as an abbreviation for an awful injury, a torn anterior cruciate ligament. Ouch. :ahhhhh:

Now it looks like setfacl is just the ticket for setting default permissions on directories, so I don't have to hand-edit them every time I add files. Sweet! :thumb:
If you don't mind, post an update with what you did and how it worked, okay?
 
Upvote 0
I can top that--I had to look up what ACL was! Being a sports fan, I only knew that as an abbreviation for an awful injury, a torn anterior cruciate ligament. Ouch. :ahhhhh:
I learned about ACLs while studying for the MCSE exams. Novell NetWare filesystems had had them for a long time, and Windows NT's NTFS was also ACL-capable. After years of dealing with UNIX and NetWare, learning the "Microsoft Way" was a painful injury of its own right. Ever have CACLS? :eek:

The main reason why I remember ACLs for Linux is because the OpenSUSE installer asks me if I want to enable ACLs on Linux filesystems. Since I recently had to reinstall after a HDD failure, my memory is still fresh.

If you don't mind, post an update with what you did and how it worked, okay?
Wot? You mean I have to follow through on it?!? Oh, carp!

Here's what I found by running getfacl on two directories. The `Video' directory was created by me, and holds the directory tree that I synchronize between my Windows and Linux machines. The `Videos' directory was created by the NAS box.

Code:
NAS2:/c/media# getfacl /c/media/Video
getfacl: Removing leading '/' from absolute path names
# file: c/media/Video
# owner: myname <--name changed to protect the incompetent -->
# group: users
user::rwx
group::r-x
other::r-x

NAS2:/c/media# getfacl /c/media/Videos
getfacl: Removing leading '/' from absolute path names
# file: c/media/Videos
# owner: myname
# group: users
user::rwx
group::r-x
other::r-x
[B]default:user::rwx
default:group::r-x
default:other::r-x[/B]
My next task is to see how I can set the `default' ACL entry for my own directories, and possibly files, without borking the whole thing. Stay tuned!
 
Upvote 0
Not sure about Moody or the rest of y'all but if you place me in front of a Linux machine of any kind, it will be unrecoverable in a heartbeat! i had to reinstall (but kept the old distro install running in console only mode, handy as my data is still there, but now it serves as a backup/rescue). then i tried to install XP Pro to make some games work (OMSI bus simulator looks fun, but it won't work in Wine, and Virtualbox crashes for being too slow or not having direct access to my video card) and guess what? no more GRUB! no more linux! well, XP's install did say it had to change my computer's 'boot flag' because it had an 'unknown operating system' but it ensured that all i'd need to do later on is change the boot flag in Disk Management under Admin tools and i'd be back to Grub and then could edit the grub.conf and have everything as it should be. then of all things, that option it promised me would be there was greyed out. not panicking, i booted my live CD and looked at KDE's partition manager. changed the boot flag right back where it was before, then rebooted. guess what then? Error loading Operation System. well frack! what now? oh wait, resize the first partition, install a 'fake' ubuntu onto it, force it to reinstall and update GRUB, yay! it's back!

Linux is FINE, until you try doing something you are easily able to do in Windows, such as install some game, or an app. then you end up having to do hours of Googling to find out how to make it work in Linux (chances are the app is Windows only and no good Linux alternative is available), then spending days fixing Linux because you edited the file and screwed the system up. like Apple's iOS, Windows 'just works' and for most people it's far easier to install apps than there is in Linux. there is no need for Wine under Windows, and i can certainly see why people are resistant to Linux. time and time again Mom keeps begging me to reinstall Windows until i can get her machine to do what she wants it to do (she just HAD to have this underwater fish screensaver that ONLY ran in Windows!). i still use Linux as my go-to OS but i do feel that unless it is intending to cater to a small minority of computer techno geeks or those with few needs (no games, or few apps, maybe they just browse the web and check their email or edit some pics? write documents? play freecell? my grandmom would be a perfect example of a Linux user) then it needs to get a bit easier, or at least have the compatibility for games. it seems that if anything is out there that Linux fails at, it's games. and games are one of those items that are specifically Windows only most of the time. if people can't play WoW or some variant of Call of Duty, and don't want to shell out $299 for a PS3 or Xbox 360, then they are not going to switch.
 
Upvote 0
While you have a valid set of points, there is a lot Linux and Windows have in common now. Ten years ago not so much. Games? There are tons. Steam is now available for Ubuntu. Wine works with most games from what I've seen. Granted there are a few that are not compatible sure. Theres also a lot of open source games for Linux.

Is Linux for everyone? I'd say not at all. It boils down to like you said. What the end user does with his computer. With that part i definitely agree with you.

And in no way was this post trying to belittle your statement ;) just my opinion on what I've seen in the last decade is all!
 
Upvote 0
no belittling here, however i'm still getting over the whole night it took to get some stupid screen saver going. i mean, come on! an underwater screen saver! not a game, a SCREEN SAVER! she got it in an email and she wanted it. double clicked the *.exe and got an error. seriously i would hate to see Linux turn into Windows but it does have issues for your average person with little or no technical experience. setting up a script that automagically launches Wine after a set idle period to run a stupid screen saver app and having to spend hours sorting through dependency hell vs. simply double-clicking the file, installing and done! no wonder Windows leads the pack to this day. either way there are still some things that are not available in Synaptic or Software Center. screen savers are one of them. i may have the experience to fix Linux when i end up breaking it but i am starting to lack the amount of patience needed to do so. i suppose once you get a system up and going exactly how you want it and then having everything work as it should, it's fine. but Linux, like old people, seem to hate change. change one thing from the normal routine, say you find this cool game you have to try, then you break the system doing everything in your power to get it running. you get part-way there, say you finally get it to run, but it's sloppy or has choppy performance, back to Google, some Ubuntu forum suggests hacking into xorg.conf and then the crap hits the fan.
 
Upvote 0
Not sure about Moody or the rest of y'all but if you place me in front of a Linux machine of any kind, it will be unrecoverable in a heartbeat!
No, not while there's Linux kiosk tools. :)

...i tried to install XP Pro to make some games work ... and guess what? no more GRUB! no more linux!
To be fair, Windows is the bad actor in this story. Windows is the one that doesn't care what else is on the computer, and puts the onus of responsibility onto the person installing Windows to get things just right. And, as you discovered, Linux wasn't actually gone.

A computer is a tool, just like a hammer or a shovel. But computers are many, many orders of magnitude more complex than a hammer or shovel! No matter how easy software developers make their products, it still requires a certain amount of knowledge to be able to run a computer properly.

One of the thickest and most difficult books that I own is about the PC boot process. There's a lot to it! And if you're installing multiple operating systems on a PC, I'd say that it's a must-read. But I'd bet that I'm the only one here who owns a book on just the PC boot process.

Ask not what your software can do to make your installations easier, ask what you can do to better understand what you're doing.

 
Upvote 0
honestly i couldn't give a flying darn about screen savers since CRTs died off in my life ages ago. they're unnecessary and i can certainly be happy that i never have to see that annoying Macarena Macacroni saver anymore, or 3-D pipes oh the horror! or worse yet is the 3-D text. i remember some moron in college was an aspiring hacker who loved deer hunting (while i can't stand it) and he managed to get admin access via telnet to my particular laptop and changed my wallpaper to a pic of a hunter with his dead prey and the screensaver was 3-D text with 'ikilledbambi' as the text. he had even went to the trouble to 'protect' it where i couldn't get my changes to delete it to stick after a reboot. so let's say i don't like 3-D text or screensavers. they're obsolete. i often disable the power management that turns off the screen while plugged in as i hated having to remember to move the mouse or hit a key to avoid being blanked out if reading a long page online somewhere. so in all honestly i just don't see the point of them today. mom, however is the kind who never takes no for an answer. if she sees something cool she has to have it on her machine.

EDIT: i later got revenge on him later as the school was still using a token ring network. he was looking at some porn (no surprise there seems to come with the kind of person he was) and i pulled out my coax and brought the entire network down. every machine was diskless and ran off the network. muahahahahha! i miss token rings for that reason!
 
Upvote 0
Not sure about Moody or the rest of y'all but if you place me in front of a Linux machine of any kind, it will be unrecoverable in a heartbeat!
I honestly don't know what to say at this point. In 25+ years I've simply never had as many problems as you have. My temptation is to say it's user error, but I don't want to make it sound like I think you're a jerk! I just don't know what else to say. I believe I've mentioned my recently departed mother, and how she quickly and EASILY adapted to Linux after many years of using window$. She couldn't bring her Linux box down. She could screw up her desktop, but I instituted a fix for that. Other than that--and opening eight million iterations of backgammon or SeaMonkey or whatever--she just couldn't harm the system.

Linux is FINE, until you try doing something you are easily able to do in Windows, such as install some game, or an app. then you end up having to do hours of Googling to find out how to make it work in Linux
Really? :thinking: I never need to do that.

(chances are the app is Windows only
So you're trying to stick a Mini Cooper's engine in a Ferrari...and wondering why it doesn't work right? Okay.

and no good Linux alternative is available)
Again, this doesn't happen in my experience, but that doesn't make YOUR experience invalid. It's just that I only use Linux, and there's nothing I want or need that isn't available to me.

then spending days fixing Linux because you edited the file and screwed the system up.
Yet again, that doesn't happen to me. And you know what? That falls squarely into the category of user error. :eek: If you're mucking with files that can bring down/screw up the system, you should have the smarts to MAKE BACKUPS first. Maybe this is why I never experience problems of this nature--I always...always...make backups of system files before editing them. In the event that something gets screwed up, booting to a prompt and restoring the original file is all it would take. Two seconds. That's how long it takes to save a copy of a file. Why aren't you routinely doing this?

Windows 'just works'
Oh, really?! I suppose that explains the ZILLIONS of tech support people whose jobs rely on window$ and its software crashing, and also explains the products/sites that exist solely to 'fix' window$ systems that have slowed down to a crawl because of viruses/malware/adware/spyware/bloatware/BSODs/and user error. Right? :laugh:

and for most people it's far easier to install apps than there is in Linux.
I truly do not understand how anything can be easier than CLICKING a name [in Synaptic] and hitting 'apply.' Show me a window$ user who can do that! No, they have to physically buy the software, it's licensed only for one computer, and when there's a new version they have to pay for that, too.

there is no need for Wine under Windows
Um, yeah, because there's no need for a window$ emulator on window$.

and i can certainly see why people are resistant to Linux.
To a person, everyone I've converted [in real life] to Linux has thanked me profusely for freeing them from the endless, greedy grip of micro$oft.

time and time again Mom keeps begging me to reinstall Windows
My mom complained, too--because her computer was too FAST after switching it to Linux. :D

until i can get her machine to do what she wants it to do
Again, this sounds like user error, as in you, not a Linux problem. I can make any Linux box do anything I (or its owner) want it to do.

(she just HAD to have this underwater fish screensaver that ONLY ran in Windows!).
Then perhaps you should explain to her that there are wonderful, beautiful NATIVE screensavers she can run instead. I personally don't use screensavers, but I helped someone on another forum install one he really wanted, and guess what its theme was? Underwater with fish and stuff! :) Really beautiful, as I recall.

i still use Linux as my go-to OS but i do feel that unless it is intending to cater to a small minority of computer techno geeks or those with few needs (no games, or few apps, maybe they just browse the web and check their email or edit some pics? write documents? play freecell?
Well, I'd hardly categorize myself as that kind of user. I'm as power user as they come, having learned 25+ years ago about the UNRIVALED power and versatility of *nix. BTW, my mom's favorite game was GNU Backgammon (gnubg), which is a fantastic 3-D game.

my grandmom would be a perfect example of a Linux user) then it needs to get a bit easier, or at least have the compatibility for games.
So you're blaming Ferrari for not being compatible with a Mini Cooper engine? Okay!

it seems that if anything is out there that Linux fails at, it's games. and games are one of those items that are specifically Windows only most of the time. if people can't play WoW or some variant of Call of Duty, and don't want to shell out $299 for a PS3 or Xbox 360, then they are not going to switch.
How about contacting game manufacturers and telling them you want native Linux versions of their software? That's what I'd do. :)
 
  • Like
Reactions: mikedt and saptech
Upvote 0
You always have to install Windows first, if you're going to dual boot with Linux. It acts like it can not see linux filesystems.

once you booted the LiveCD, just reinstall Grub to MBR.

Everytime I install games or apps in linux, I just click the icon to run it.

What file did you edit that screwed up your system?

I do not see how Windows is easier to do install/updates then Linux. With linux I can update/upgrade every file on this system with one commmand, provided the updates/upgrade is available ( I like using CLI instead of GUI).

There is a fish tank screensaver I've seen with some linux distros. Sorry, I can't tell you the name of it. I think Fedora comes with one.

It's true about Windows types of games not available for Linux, but as Moody mention, thats because of the games developers, not Linux fault.

Also the Distro can cause problems for users too. One distro may work great for me but not for other users. When I first started using Linux, the so-called easy distros gave me fits trying to get installed. I ended up using Slackware & Debian, the first time I installed those, no problems.

Just my thoughts!
 
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