Earlier quoted context omitted.
You know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...
I mean we're heading there with /usr being your /System. Redhat/Pottering are doing heroic work in this space. /Users -> /home /System -> /usr /Data -> /var /Config -> /etc /Boot -> /boot /Ephemeral Temp -> /run /Persistent Temp -> /tmp The only real holdouts are proc/sys/dev which are the kernel and mnt/media/opt/srv which are really for the user/sysadmin and aren't really used by the OS anymore.
I'm “still afraid to use spaces in file names” years old
451–460 of 817 posts
Re: I'm “still afraid to use spaces in file names” years old
#452Earlier quoted context omitted.
How do you deal with lack of being able to just point to "/usr/lib/include" or other things when saying "here's my directory of shared libs"? This is definitely interesting though, and an improvement I would say
GoboLinux symlinks everything into an FHS-ish structure under /System/Index/ so you still have a single place where binaries/libraries/includes/etc. live. (There are also symlinks from /usr/lib, /usr/bin, and others into /System/Index/ for compatibility with programs where those might be hardcoded.)
Re: I'm “still afraid to use spaces in file names” years old
#453Earlier quoted context omitted.
You know, this makes me wonder.. tangentially speaking- I wonder how hard it would be to rearrange the folder structure in linux so that I have something like this: /Users/{root, user0, user1, ... }... /System/{Logs, Apps/{opt, container, ...}, Temp, Conf ...}... /Devices/{Mount, sda, sdb, null ...}... /Boot/...
This is what I want from Linux. Sensible & guessable names for newcomers to figure out where to put files and programs. It's frustrating having to spend time to decide whether I should install a program in /var or /opt or /usr. What do they even mean! So, I disagree with this convention altogether and use /apps or ~/apps now.
"While no one sane would put newlines in directory names, such corruption of the results could lead to exploitable vulnerabilities in scripts."
Re: I'm “still afraid to use spaces in file names” years old
#454My username has been my name which has an accented character and has broken countless Windows apps every year since forever, so I just keep a C:/Programs folder where I run stuff. You should never not fear filenames.
I still don't use the special character of my name in my username because that has caused me many hard to fix troubles. Think "cannot recover user password because this user doesn't exist".
Re: I'm “still afraid to use spaces in file names” years old
#455Earlier quoted context omitted.
Could you please stop posting ideological battle comments to HN? We ban accounts that do that, regardless of their ideology, because it's (a) not what this site is for, and (b) destroys what it is for. If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.
Agreed. But Hacker News should do something about all of the anti-bitcoin and anti-anti-nuclear ideologies running around in here. I don't really mind it that much but it'd be nice, it's really the only 2 extremisms I've experienced here, all other subjects are discussed in a fair manner.
Re: I'm “still afraid to use spaces in file names” years old
#456I have an overly-aggressive function in my .bashrc to rename all files in the current directory: # Rename all files in a directory rn() { rename "s/ /-/g" * rename "s/_/-/g" * rename "s/–/-/g" * rename "s/://g" * rename "s/\(//g" * rename "s/\)//g" * rename "s/\[//g" * rename "s/\]//g" * rename 's/"//g' * rename "s/'//g" * rename "s/,//g" * rename "y/A-Z/a-z/" * rename "s/---/--/g" * rename "s/---/--/g" * } I use th…
Overly aggresive is right! I don't know if this is genius or deranged! I'm leaning towards genius and stealing the idea. By the way: what's your beef with en dashes? I mean, if it was "everything should be 'HYPHEN-MINUS' (U+002D)", then fine, but why specifically en dashes and not em dashes?
Of all the changes in that list, removing the character that doesn't appear on a standard keyboard seems like the least controversial...
Re: I'm “still afraid to use spaces in file names” years old
#457I have an overly-aggressive function in my .bashrc to rename all files in the current directory: # Rename all files in a directory rn() { rename "s/ /-/g" * rename "s/_/-/g" * rename "s/–/-/g" * rename "s/://g" * rename "s/\(//g" * rename "s/\)//g" * rename "s/\[//g" * rename "s/\]//g" * rename 's/"//g' * rename "s/'//g" * rename "s/,//g" * rename "y/A-Z/a-z/" * rename "s/---/--/g" * rename "s/---/--/g" * } I use th…
In addition to CLI I use it from emacs dired-mode too:
(defun my-dired-detox ()
(interactive)
(dired-do-shell-command "detox" nil (dired-get-marked-files))
(revert-buffer))
I bind it to "_" in dired-mode.Re: I'm “still afraid to use spaces in file names” years old
#458I work on a complex desktop application, and it's been astounding the number of bugs that have appeared over the years triggered by spaces and other unusual characters in file names. If you do anything with subprocesses or path processing, it's absurdly easy to hit in a thousand different ways, over and over again. Pro tip: rename your development directory (or even better: the workspace path in CI) to put a space an…
Seems like MS had the same idea according to an answer in the link: > Microsoft intentionally made programs install to C:\Program Files on Windows 95+ to force programmers to deal with spaces in filenames.
Re: I'm “still afraid to use spaces in file names” years old
#459Re: I'm “still afraid to use spaces in file names” years old
#460Earlier quoted context omitted.
I go one step further: 2021-11-11_client_project-name.ext 2021-11-11_client_projectName.ext is also OK. But underscore separates fields, hyphens for space replacement.
I see and applaud your use of the underscore there, but I must reject the premise! work/client/project/2021-11-11-file.ext is more or less how I lay stuff out. I’d say client/project is a folder level distinction (arguably dates too). [EDIT] Realistically most of the stuff under is git repos and I usually make a “home” repo where I keep org files for tracking hours, notes, and resources related to the engagement.