This newbie has overcome his fear of the terminal
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 30 days after creation.
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 30 days after creation.
This newbie has overcome his fear of the terminal
The Linux Command Line
Fourth Internet Edition
William Shotts
I saw a link in another newbies post who wanted to have a manual for learning command lines. I clicked it and now I am hooked. Learned more about how Linux works in an hour than in the past few months. Amazing.
I finally have overcome my fear of the terminal. Since I got myself entangled into a busybox several times with LM19 I understood the need to know some basic commands.
My first lesson with the Linux Command Line PDF was a warning NOT to use spaces in filenames. That is a habit I had copied from Windows. I now understand why it is better not to use spaces. It may seem like a little thing, but knowledge of many little things like these, surely make managing LinuxMInt even more easier.
Well, I just wanted to express my joy at learning to know the terminal better. A newbie victory over my fear of the terminal, lol...
Fourth Internet Edition
William Shotts
I saw a link in another newbies post who wanted to have a manual for learning command lines. I clicked it and now I am hooked. Learned more about how Linux works in an hour than in the past few months. Amazing.
I finally have overcome my fear of the terminal. Since I got myself entangled into a busybox several times with LM19 I understood the need to know some basic commands.
My first lesson with the Linux Command Line PDF was a warning NOT to use spaces in filenames. That is a habit I had copied from Windows. I now understand why it is better not to use spaces. It may seem like a little thing, but knowledge of many little things like these, surely make managing LinuxMInt even more easier.
Well, I just wanted to express my joy at learning to know the terminal better. A newbie victory over my fear of the terminal, lol...
Last edited by LockBot on Wed Dec 07, 2022 4:01 am, edited 1 time in total.
Reason: Topic automatically closed 30 days after creation. New replies are no longer allowed.
Reason: Topic automatically closed 30 days after creation. New replies are no longer allowed.
-
- Level 20
- Posts: 12337
- Joined: Sun Aug 09, 2015 10:00 am
Re: This newbie has overcome his fear of the terminal
Welcome to the terminal land
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Regards,
Deepak
Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Re: This newbie has overcome his fear of the terminal
Sourceforge won't proceed with download so can't check what exactly the book said, but flat out saying you shouldn't use whitespace in filenames is weird. It's fine.
On the terminal you just have to remember to:
On the terminal you just have to remember to:
- Quote filenames with whitespace in them, as in
cat "my file.txt"
- Or escape whitespace (prefix it with a backslash), as in
cat my\ file.txt
- Or use file globbing (which could match multiple files), as in
cat my*.txt
Re: This newbie has overcome his fear of the terminal
Even though I do know what you mean, I am waiting for the "I don't see any white spaces"xenopeek wrote: ⤴Thu Nov 01, 2018 9:35 am Sourceforge won't proceed with download so can't check what exactly the book said, but flat out saying you shouldn't use whitespace in filenames is weird. It's fine.
On the terminal you just have to remember to:Pressing Tab key on the terminal after typing a partial filename will auto-complete the name and add escapes for whitespaces where needed. I'd guess most use that.
- Quote filenames with whitespace in them, as in
cat "my file.txt"
- Or escape whitespace (prefix it with a backslash), as in
cat my\ file.txt
- Or use file globbing (which could match multiple files), as in
cat my*.txt
"Tune for maximum Smoke and then read the Instructions".
Re: This newbie has overcome his fear of the terminal
Exactly. Stop the racial discrimination of spaces. Black spaces matter!
But seriously, not seeing a problem with spaces in file names, either. If anything they are the easiest special characters to deal with. Quotation marks, wild card characters and things like that as part of the actual file name can be much more annoying.
Code: Select all
$ touch "'Quote*\'this'"
$ ls
''\''Quote*\'\''this'\'''
Last edited by gm10 on Thu Nov 01, 2018 9:57 am, edited 1 time in total.
Re: This newbie has overcome his fear of the terminal
https://sourceforge.net/projects/linuxc ... stdownload worked for me. I used Google Chrome incognito mode with absolutely no ad/script blocker.
Re: This newbie has overcome his fear of the terminal
While it's true that files with spaces in their names can be dealt with, I prefer to avoid spaces in files I create.
I like this oldish link on filenames: http://pclosmag.com/html/Issues/201607/page03.html
I like this oldish link on filenames: http://pclosmag.com/html/Issues/201607/page03.html
Re: This newbie has overcome his fear of the terminal
Congratulations !carum carvi wrote: ⤴Thu Nov 01, 2018 6:41 am ......
I finally have overcome my fear of the terminal.
.....
My first lesson with the Linux Command Line PDF was a warning NOT to use spaces in filenames. That is a habit I had copied from Windows. I now understand why it is better not to use spaces. It may seem like a little thing, but knowledge of many little things like these, surely make managing LinuxMInt even more easier.
Your life will be improved for evermore .....
...... OK , slight exaggeration
As to white-space in filenames ..... Don't do it ! .... just say no .
Keep yourself and your coding on the path of true purity .....
Why bother with having to escape characters in filenames ? .... it is twisted thinking and it makes no sense at all to me .
But I'm getting old , and I came to Linux with my old UNIX head on ..... call me old-fashioned if you will ....
- absque fenestris
- Level 12
- Posts: 4110
- Joined: Sat Nov 12, 2016 8:42 pm
- Location: Confoederatio Helvetica
Re: This newbie has overcome his fear of the terminal
I've been working with spaces in title names for 24 years (Mac first and Linux 15 years later).
That was my protest against DOS and Windows.
It's easier to read - for human beings and looks more beautiful.
Quite a lot of devices have broken down over time, but my backed up old and new data - with spaces in the titles - I can still read and edit...
That was my protest against DOS and Windows.
It's easier to read - for human beings and looks more beautiful.
Quite a lot of devices have broken down over time, but my backed up old and new data - with spaces in the titles - I can still read and edit...
Re: This newbie has overcome his fear of the terminal
I avoid spaces as well - just individual preference. Years ago in college I was taught myFile.txt approach which is now habit and works well for me but as xenopeek points out there are more than one to skin this cat (no pun intended).aes2011 wrote: ⤴Thu Nov 01, 2018 10:01 am While it's true that files with spaces in their names can be dealt with, I prefer to avoid spaces in files I create.
I like this oldish link on filenames: http://pclosmag.com/html/Issues/201607/page03.html
Re: This newbie has overcome his fear of the terminal
Excellent advice. You can get around it as others described, but spaces will probably cause you trouble eventually (like when you don't expect files with spaces in the names), and there's not much of an upside. Almost no OS files contain spaces (just wallpaper names on my system)carum carvi wrote: ⤴Thu Nov 01, 2018 6:41 amMy first lesson with the Linux Command Line PDF was a warning NOT to use spaces in filenames.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: This newbie has overcome his fear of the terminal
Legibility or how do you folks keep your business and home administration in order.
2018-11-02_with_files_named_like_this.ods or 20181102WithFilesNamedLikeThis.ods?
I prefer "2018-11-02 With Files Named Like This.ods" as easier
Same with directory names; "My New Project" not my_new_project or MyNewProject.
I use names-like-this for scripts but certainly not stabbing my eyes with underscores, dashes or camelcase for everything else. If you're writing scripts where you deliberately go out of your way to not handle spaces in filenames, well sure. I can't think of an example where spaces are a problem.
2018-11-02_with_files_named_like_this.ods or 20181102WithFilesNamedLikeThis.ods?
I prefer "2018-11-02 With Files Named Like This.ods" as easier
Same with directory names; "My New Project" not my_new_project or MyNewProject.
I use names-like-this for scripts but certainly not stabbing my eyes with underscores, dashes or camelcase for everything else. If you're writing scripts where you deliberately go out of your way to not handle spaces in filenames, well sure. I can't think of an example where spaces are a problem.
Re: This newbie has overcome his fear of the terminal
"Though Linux supports long filenames which may contain embedded spaces and punctuation characters, limit the punctuation characters in the names offiles you create to period, dash, and underscore. Most importantly, do not embed spaces in filenames. If you want to represent spaces between words in a filename, use underscore characters. You will thank yourself later."
Quote from the LinuxCommandLIneManual pdf
I thought it would make it better understandable where my advice came from by quoting it.
One of two reasons why I did not started to use LinuxMint earlier was because of compatibility issues of files between Microsoft and Linux. Eager to not make the same mistake twice I was searching for the best way to name files in order to exchange them between my Linux and somebody else'Apple and Microsoft. But as is my experience with Linux when I have a problem Linux users come up with several solutions in no time. Thanks for the tips everybody how I can use spaces anyway.
But do these solutions (to still easily use spaces in linux files) still work when these Linux files have to be read by Windows or Apple?
Quote from the LinuxCommandLIneManual pdf
I thought it would make it better understandable where my advice came from by quoting it.
One of two reasons why I did not started to use LinuxMint earlier was because of compatibility issues of files between Microsoft and Linux. Eager to not make the same mistake twice I was searching for the best way to name files in order to exchange them between my Linux and somebody else'Apple and Microsoft. But as is my experience with Linux when I have a problem Linux users come up with several solutions in no time. Thanks for the tips everybody how I can use spaces anyway.
But do these solutions (to still easily use spaces in linux files) still work when these Linux files have to be read by Windows or Apple?
Re: This newbie has overcome his fear of the terminal
Both of those handle spaces just the same.carum carvi wrote: ⤴Fri Nov 02, 2018 5:16 amBut do these solutions (to still easily use spaces in linux files) still work when these Linux files have to be read by Windows or Apple?
Re: This newbie has overcome his fear of the terminal
For compatibility with NTFS (and VFAT and exFat) avoid these characters in filenames that are legal on UNIX: all characters with ASCII value less than 32 and value 127 (control characters) and \ * ? % : | < > "
Forward slash / is not allowed on UNIX by being the directory separator, and in fact not on Windows either where it's interchangeable with the disallowed backslash separator. Trailing periods or spaces also won't do.
With a possible exception for : I would suggest to avoid the above list \ * ? % : | < > " on UNIX as well and would add single quote '. Space I would not avoid, certainly not for e.g. music, but that means quoting and that means you really are best off without " or '.
Forward slash / is not allowed on UNIX by being the directory separator, and in fact not on Windows either where it's interchangeable with the disallowed backslash separator. Trailing periods or spaces also won't do.
With a possible exception for : I would suggest to avoid the above list \ * ? % : | < > " on UNIX as well and would add single quote '. Space I would not avoid, certainly not for e.g. music, but that means quoting and that means you really are best off without " or '.
Re: This newbie has overcome his fear of the terminal
Here's at least one mention (on page 36 of OP's reference):carum carvi wrote: ⤴Thu Nov 01, 2018 6:41 am My first lesson with the Linux Command Line PDF was a warning NOT to use spaces in filenames.
Of course, one will learn more, as Yoda teaches us, by using all sorts of characters in filenames4.Though Linux supports long filenames which may contain embedded spaces
and punctuation characters, limit the punctuation characters in the names of
files you create to period, dash, and underscore. Most importantly, do not em-
bed spaces in filenames. If you want to represent spaces between words in a
filename, use underscore characters. You will thank yourself later.
Re: This newbie has overcome his fear of the terminal
I "grew up" with 8.3 filenames. When Long filenames were introduced in Windwoes way back when I did embrace it, however, I did not use a long filename to write "War and Peace". I will generally store files in folders related to the topic at hand. Even if that folder only contains one or two files. e.g. 2010Reconciliation contains all files related to that process. I do the same with all my music, Firstly grouped by music genre then by artist, then a subfolder of album. Much neater than RockPinkFloydTheWallTheWall . Isn't /Rock/PinkFloyd/TheWall/TheWall much neater?
Fully mint Household
Out of my mind - please leave a message
Out of my mind - please leave a message
Re: This newbie has overcome his fear of the terminal
Dunno, it would be Pink Floyd - The Wall on my system, I find that much easier on the eyes. But I believe the point has been made: There's no technical reason not to use spaces in file names. You are free to name your files whichever way you prefer. Nothing more to say really.lsemmens wrote: ⤴Fri Nov 02, 2018 8:26 am I "grew up" with 8.3 filenames. When Long filenames were introduced in Windwoes way back when I did embrace it, however, I did not use a long filename to write "War and Peace". I will generally store files in folders related to the topic at hand. Even if that folder only contains one or two files. e.g. 2010Reconciliation contains all files related to that process. I do the same with all my music, Firstly grouped by music genre then by artist, then a subfolder of album. Much neater than RockPinkFloydTheWallTheWall . Isn't /Rock/PinkFloyd/TheWall/TheWall much neater?
- Portreve
- Level 13
- Posts: 4870
- Joined: Mon Apr 18, 2011 12:03 am
- Location: Within 20,004 km of YOU!
- Contact:
Re: This newbie has overcome his fear of the terminal
I don't really think much of the mindset or mentality which promotes the idea of sticking with tradition or habit or "what you know" over thinking for oneself, and honestly I have little use for those persons who function in that way, whether in the technology world or elsewhere.
There are certain specialized places and situations where one should not use spaces; however, generally, spaces are appropriate and make things, as has been alluded to above, much more human friendly. Can you imagine trying to read a newspaper where they didn't use spaces?
I use the terminal from time to time to accomplish certain specific tasks, but I operate on the desktop, so why spaces should be a problem, as far as I'm concerned, is normally just people preferring dogma over having to use their brain and think about what's actually appropriate for the situation.
Just my 2¢.
There are certain specialized places and situations where one should not use spaces; however, generally, spaces are appropriate and make things, as has been alluded to above, much more human friendly. Can you imagine trying to read a newspaper where they didn't use spaces?
I use the terminal from time to time to accomplish certain specific tasks, but I operate on the desktop, so why spaces should be a problem, as far as I'm concerned, is normally just people preferring dogma over having to use their brain and think about what's actually appropriate for the situation.
Just my 2¢.
Flying this flag in support of freedom 🇺🇦
Recommended keyboard layout: English (intl., with AltGR dead keys)
Podcasts: Linux Unplugged, Destination Linux
Also check out Thor Hartmannsson's Linux Tips YouTube Channel
Recommended keyboard layout: English (intl., with AltGR dead keys)
Podcasts: Linux Unplugged, Destination Linux
Also check out Thor Hartmannsson's Linux Tips YouTube Channel
Re: This newbie has overcome his fear of the terminal
What has reading newspapers got to do with a newcomer to the command-line?Portreve wrote: ⤴Sat Nov 03, 2018 7:45 am I don't really think much of the mindset or mentality which promotes the idea of sticking with tradition or habit or "what you know" over thinking for oneself, and honestly I have little use for those persons who function in that way, whether in the technology world or elsewhere.
There are certain specialized places and situations where one should not use spaces; however, generally, spaces are appropriate and make things, as has been alluded to above, much more human friendly. Can you imagine trying to read a newspaper where they didn't use spaces?
I use the terminal from time to time to accomplish certain specific tasks, but I operate on the desktop, so why spaces should be a problem, as far as I'm concerned, is normally just people preferring dogma over having to use their brain and think about what's actually appropriate for the situation.
Just my 2¢.