Pacmatic gives you a choice to "update" each config file, including the mirrorlist. Choices include merging using vim-diff (usually the best choice) and deleting the .pacnew file (reasonable for mirrorlist).
reflector is good to keep your mirrorlist up to date.
Are you considering an archive because that would be nice to browse, meaning you could expand and collapse subdirs?
But you also want him to manipulate the list, return it to you in a format that is machine readable (so you can copy his selection automatically), right?
How about vim? Okay, hear me out. Get your list of files in text format, maybe a little recursive shell script that incorporates vim fold marks¹see edit.
He views the list in vim. Even if he doesn't know vim, he would have to learn extremely little:
Cursor keys, page up/down work.
zo to open a fold/subdir, zc to close it.
Press v, then cursor keys/page up/down to select what he doesn't want, or just position the cursor on a collapsed subdir, then
dd to delete the selection.
:x saves his laundry list and exits.
¹~~{{{ at the end of the line with a subdir name, }}} on the line of it's last entry.~~
Edit: Just use tree -fno foobar.txt, remove the fancy graphical characters, e.g. with sed, and have your friend to :set foldmethod=indent first thing in vim.
Edit2: sed 's/[├─└│]/ /g' <foobar.txt >list.txt
Edit3: Yeah... turns out indent-folding doesn't work that way in vim... I'm sure /r/vim could tell you how to get the folding right.
Edit4: Tree inserts leading non-breaking spaces. That's what threw the automatic folding off. Yeah, the universe is against me.
This user has said that he has lots to learn and has expressed interest in learning systematically. Therefore I see little necessity to entice him to learn by provoking errors.
Dude, Tafkap/Symbol ring a bell? A hyphen is really mundane in comparison. ;)
But seriously: You don't know how those 5500 names came to be on the harddisk. There could easily be a mistake. Maybe the naming scheme is '$album-$artist' and some album names got left out. Maybe the user used a leading hyphen to mark directories as special. Maybe the names were created by some software that used unreliable data from the internet and failed occasionally. There's a million ways for this to go wrong, and the user won't reliably check it in 5500 cases. You were concerned with robustness yourself, rightfully so.
But most importantly, I want this subreddit not only to dole out fish, but also to offer some fishing lessons. This is no IRC. We should expect users to take the solutions offered here and transfer them to future problems, i.e. situations were a leading hyphen is even less unlikely.
Sorry, I don't know a good guide to zsh for beginners off the top of my head, but I'll message you if I find one. It would be a good question for /r/commandline, though.
I'm just converting from bash to zsh and found this guide challenging, but excellent. If you aren't easily scared, have a look at the toc, cherry pick a few chapters and look at some examples, just to see how powerful zsh is.
My solution which I edited in above is a small example, demonstrating differences to bash:
The list of filenames is not generated via an external program, but by zsh itself: the '**' glob will recursively expand, encompassing sub-subdirectories. ':h' (head) and ':t' (tail) are modifiers.
'--' tells mv "end of options, the rest is arguments". Otherwise it would break if a directory's name started with '-'; mv would think it was an option. Also, parsing ls would break if a directory- or filename contained a newline. (Highly unlikely, but better safe than sorry).
Edit: For the basic stuff, zsh and bash are the same.
Since you are just starting out in the shell, try to learn properly and avoid falling into bad habits. It'll save you time down the road. This is a good example: Parsing the output of ls is very ugly.
Again, since you are starting out: also consider getting into zsh instead of bash. If your example became more complex, you would need to learn about find in bash, which can quickly become ugly as well – or simply about globbing in zsh.
Edit: Note to self:
for i in music/**/(cover|folder).jp*g; do
mv -- "$i" "$i:h/$i:h:t.jpg"
done
Edit 2: After an 'autoload zmv', even a one-liner should work for files music/album/foo.jpg and deeper:
zmv -w 'music/**/foo.jpg' 'music/${1}${1:t}.jpg'
Edit 3: Hello71 is correct: I forgot about ARG_MAX.
Edit 4: If I understand the output of 'xargs --show-limits --no-run-if-empty' correctly, the commandline can be about 2MB long on my system. That should be enough for anybody! ;)
Right click on e.g. a .jpeg > Properties > Open with > Add > Use a custom command
This is Nautilus 2.30.1.
Edit: I assumed they wouldn't remove this functionality. I realize that assumption is a risk. You might be interested in SpaceFM, a successor to PCMan File Manager.
You're welcome. Well, I meant you get only one chance to do it right. If you make a mistake, like if you discover afterwards that your backup did not contain all you data, or not in the way you wanted, it's too late.
So practice on a test/dummy backup first. Create a directory somewhere that looks similar to your home directory: some subdirectories, some different files. Pretend it's your real home dir and test if your plan really works. See if after moving and restoring it everything looks the same: dir structure, file permissions and ownership.
On compression, see the man page, but remember that it's slow and that images, sound and video are not really compressible (further) anyway.
First, I'll mention sth. trivial that's easy to overlook: Empty all ~/tmp, browser (and other app?) caches and Trash and do a quick scan if there are big files you'll never need again somewhere.
Does the current Fedora partition have enough space to hold a copy of /home? It looks like you need to move that tar to an NTFS partition eventually anyway, so tar might as well write there directly.
Similar to what eyeckm said:
tar -cpvf /some/ntfs/space/home.tar /home/*
Read man tar to make sure you understand; e.g. remember to preserve file permissions. And run some tests with a small dummy directory mimicking /home.
Look through the relevant subreddits, determine the top two or three distros recommended for your situation, go to their home pages and follow the instructions to boot their Live CD (usually works on USB stick as well).
People on some random forums seemed to recommend installing Ubuntu inside Windows for beginners, and then dual booting once they got a hang of it. Is this the best way to go forward?
The non-technical and highly subjective answer is that a Linux user is more likely to learn to fish, whlle Windows users are provided with fish. Granted, Ubuntu is the worst example to make that point, since the community has an ease-of-use spirit similar to that of the Windows community. For a glimpse of the self-help philosophy, read the "How to ask questions..." link in the sidebar.
A basc idea of Linux is that a user can access, understand and modify every part of the system. I'm sure there's great documentation for other OS as well, but in my experience, your chance of getting in contact with it is higher on Linux.
I think starting to "learn Linux" should mean setting up a machine with the applications you want, the user interface you like and the backup process you need. Do not blindly follow instructions, but try to understand them and every part of the system as you get i contact with it during setup and maintenance. Also, obviously, check the sidebars in relevant subreddits. Have fun!
Ah, you knew that document already. I wish you good luck.
What, that's all? I knew this, more or less, but it had never occurred to me this might work with caps lock, which works differently than an ordinary key. Thanks, I'll try that tomorrow.
Edit: Happened upon this old comment. If the same happened to you: Congratulations! Here's your reward, since it turned out to be not quite that easy:
! .xmodmap
! Scroll Lock becomes Caps Lock, Caps Lock becomes Escape
remove lock = Caps_Lock
keysym Scroll_Lock = Caps_Lock
keysym Caps_Lock = Escape
add lock = Caps_Lock
! swap AltGr with both Windows keys
! You need to find your keycodes with xev
remove mod5 = ISO_Level3_Shift
remove mod4 = Super_L
keycode 108 = Super_L
keycode 133 = ISO_Level3_Shift
add mod5 = ISO_Level3_Shift
keycode 134 = ISO_Level3_Shift
add mod4 = Super_L
This is a little old, but looks quite thorough. If you read it, please let me know if it's helpful. When I have time, I'd like to try swapping the capslock and escape keys.
https://wiki.archlinux.org/index.php/Aura#Installation
Pacmatic gives you a choice to "update" each config file, including the mirrorlist. Choices include merging using vim-diff (usually the best choice) and deleting the
.pacnewfile (reasonable for mirrorlist).reflectoris good to keep your mirrorlist up to date.Have you seen
:h filetype-plugin?Also, /r/vim is very helpful.
Greg's Wiki
Advanced Bash-Scripting Guide
/r/commandline
Vim is cross-platform. Btw., it [tree] can also output HTML, so you needn't worry about line endings.
And I just found out why the folding by indentation didn't work: Bloody f*#!"cking tree inserts leading non-breaking spaces!!! Arrrgh! Drove me nuts.
Are you considering an archive because that would be nice to browse, meaning you could expand and collapse subdirs?
But you also want him to manipulate the list, return it to you in a format that is machine readable (so you can copy his selection automatically), right?
How about vim? Okay, hear me out. Get your list of files in text format,
maybe a little recursive shell script that incorporates vim fold marks¹see edit.He views the list in vim. Even if he doesn't know vim, he would have to learn extremely little:
Cursor keys, page up/down work.
zoto open a fold/subdir,zcto close it.Press
v, then cursor keys/page up/down to select what he doesn't want, or just position the cursor on a collapsed subdir, thenddto delete the selection.:xsaves his laundry list and exits.¹~~
{{{at the end of the line with a subdir name,}}}on the line of it's last entry.~~Edit: Just use
tree -fno foobar.txt, remove the fancy graphical characters, e.g. with sed,and have your friend to:set foldmethod=indentfirst thing in vim.Edit2:
sed 's/[├─└│]/ /g' <foobar.txt >list.txtEdit3: Yeah... turns out indent-folding doesn't work that way in vim... I'm sure /r/vim could tell you how to get the folding right.
Edit4: Tree inserts leading non-breaking spaces. That's what threw the automatic folding off. Yeah, the universe is against me.
This user has said that he has lots to learn and has expressed interest in learning systematically. Therefore I see little necessity to entice him to learn by provoking errors.
I think what's necessary has been said.
Dude, Tafkap/Symbol ring a bell? A hyphen is really mundane in comparison. ;)
But seriously: You don't know how those 5500 names came to be on the harddisk. There could easily be a mistake. Maybe the naming scheme is '$album-$artist' and some album names got left out. Maybe the user used a leading hyphen to mark directories as special. Maybe the names were created by some software that used unreliable data from the internet and failed occasionally. There's a million ways for this to go wrong, and the user won't reliably check it in 5500 cases. You were concerned with robustness yourself, rightfully so.
But most importantly, I want this subreddit not only to dole out fish, but also to offer some fishing lessons. This is no IRC. We should expect users to take the solutions offered here and transfer them to future problems, i.e. situations were a leading hyphen is even less unlikely.
Piggybacking: Find out if your ARG_MAX is big enough with
You are right. Still, shouldn't you replace
'mv'with'mv --'?Sorry, I don't know a good guide to zsh for beginners off the top of my head, but I'll message you if I find one. It would be a good question for /r/commandline, though.
I'm just converting from bash to zsh and found this guide challenging, but excellent. If you aren't easily scared, have a look at the toc, cherry pick a few chapters and look at some examples, just to see how powerful zsh is.
My solution which I edited in above is a small example, demonstrating differences to bash:
The list of filenames is not generated via an external program, but by zsh itself: the '**' glob will recursively expand, encompassing sub-subdirectories. ':h' (head) and ':t' (tail) are modifiers.
'--' tells
mv"end of options, the rest is arguments". Otherwise it would break if a directory's name started with '-';mvwould think it was an option. Also, parsinglswould break if a directory- or filename contained a newline. (Highly unlikely, but better safe than sorry).Edit: For the basic stuff, zsh and bash are the same.
Since you are just starting out in the shell, try to learn properly and avoid falling into bad habits. It'll save you time down the road. This is a good example: Parsing the output of
lsis very ugly.Again, since you are starting out: also consider getting into
zshinstead ofbash. If your example became more complex, you would need to learn aboutfindin bash, which can quickly become ugly as well – or simply about globbing inzsh.Edit: Note to self:
Edit 2: After an
'autoload zmv', even a one-liner should work for files music/album/foo.jpg and deeper:Edit 3: Hello71 is correct: I forgot about ARG_MAX.
Edit 4: If I understand the output of
'xargs --show-limits --no-run-if-empty'correctly, the commandline can be about 2MB long on my system. That should be enough for anybody! ;)Classical, even.
Right click on e.g. a .jpeg > Properties > Open with > Add > Use a custom command
This is Nautilus 2.30.1.
Edit: I assumed they wouldn't remove this functionality. I realize that assumption is a risk. You might be interested in SpaceFM, a successor to PCMan File Manager.
"Properties" instead.
You're welcome. Well, I meant you get only one chance to do it right. If you make a mistake, like if you discover afterwards that your backup did not contain all you data, or not in the way you wanted, it's too late.
So practice on a test/dummy backup first. Create a directory somewhere that looks similar to your home directory: some subdirectories, some different files. Pretend it's your real home dir and test if your plan really works. See if after moving and restoring it everything looks the same: dir structure, file permissions and ownership.
On compression, see the man page, but remember that it's slow and that images, sound and video are not really compressible (further) anyway.
First, I'll mention sth. trivial that's easy to overlook: Empty all ~/tmp, browser (and other app?) caches and Trash and do a quick scan if there are big files you'll never need again somewhere.
Does the current Fedora partition have enough space to hold a copy of /home? It looks like you need to move that tar to an NTFS partition eventually anyway, so tar might as well write there directly.
Similar to what eyeckm said:
Read man tar to make sure you understand; e.g. remember to preserve file permissions. And run some tests with a small dummy directory mimicking /home.
Edit: typo and italics
Look through the relevant subreddits, determine the top two or three distros recommended for your situation, go to their home pages and follow the instructions to boot their Live CD (usually works on USB stick as well).
Yes, good plan.
Yes. No disagreement from me.
The non-technical and highly subjective answer is that a Linux user is more likely to learn to fish, whlle Windows users are provided with fish. Granted, Ubuntu is the worst example to make that point, since the community has an ease-of-use spirit similar to that of the Windows community. For a glimpse of the self-help philosophy, read the "How to ask questions..." link in the sidebar.
A basc idea of Linux is that a user can access, understand and modify every part of the system. I'm sure there's great documentation for other OS as well, but in my experience, your chance of getting in contact with it is higher on Linux.
I think starting to "learn Linux" should mean setting up a machine with the applications you want, the user interface you like and the backup process you need. Do not blindly follow instructions, but try to understand them and every part of the system as you get i contact with it during setup and maintenance. Also, obviously, check the sidebars in relevant subreddits. Have fun!
See who offers LXDE, that may be the most lightweight complete desktop environment.
Mint is a common recommendation, and Mint Debian Edition is not Ubuntu.
Ah, you knew that document already. I wish you good luck.
What, that's all? I knew this, more or less, but it had never occurred to me this might work with caps lock, which works differently than an ordinary key. Thanks, I'll try that tomorrow.
Edit: Happened upon this old comment. If the same happened to you: Congratulations! Here's your reward, since it turned out to be not quite that easy:
This is a little old, but looks quite thorough. If you read it, please let me know if it's helpful. When I have time, I'd like to try swapping the capslock and escape keys.
Not an expert on this, but what about HDD-related BIOS settings in both machines?
What is unencrypted – just /boot?
What exactly did Puppy manage to mount? All partitions outside of LUKS?
And what does "will not boot" mean?