Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu.Wang 2019-04-11 08:50:32 +08:00
commit 69e533a4f5
6 changed files with 595 additions and 599 deletions

View File

@ -1,359 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (liujing97)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How To Understand And Identify File types in Linux)
[#]: via: (https://www.2daygeek.com/how-to-understand-and-identify-file-types-in-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
How To Understand And Identify File types in Linux
======
We all are knows, that everything is a file in Linux which includes Hard Disk, Graphics Card, etc.
When you are navigating the Linux filesystem most of the files are fall under regular files and directories.
But it has other file types as well for different purpose which fall in five categories.
So, its very important to understand the file types in Linux that helps you in many ways.
If you cant believe this, you just gone through the complete article then you come to know how important is.
If you dont understand the file types you cant make any changes on that without fear.
If you made the changes wrongly that damage your system very badly so be careful when you are doing that.
Files are very important in Linux because all the devices and daemons were stored as a file in Linux system.
### How Many Types of File is Available in Linux?
As per my knowledge, totally 7 types of files are available in Linux with 3 Major categories. The details are below.
* Regular File
* Directory File
* Special Files (This category having five type of files)
* Link File
* Character Device File
* Socket File
* Named Pipe File
* Block File
Refer the below table for better understanding of file types in Linux.
| Symbol | Meaning |
| | Regular File. It starts with underscore “_”. |
| d | Directory File. It starts with English alphabet letter “d”. |
| l | Link File. It starts with English alphabet letter “l”. |
| c | Character Device File. It starts with English alphabet letter “c”. |
| s | Socket File. It starts with English alphabet letter “s”. |
| p | Named Pipe File. It starts with English alphabet letter “p”. |
| b | Block File. It starts with English alphabet letter “b”. |
### Method-1: Manual Way to Identify File types in Linux
If you are having good knowledge in Linux then you can easily identify the files type with help of above table.
#### How to view the Regular files in Linux?
Use the below command to view the Regular files in Linux. Regular files are available everywhere in Linux filesystem.
The Regular files color is `WHITE`
```
# ls -la | grep ^-
-rw-------. 1 mageshm mageshm 1394 Jan 18 15:59 .bash_history
-rw-r--r--. 1 mageshm mageshm 18 May 11 2012 .bash_logout
-rw-r--r--. 1 mageshm mageshm 176 May 11 2012 .bash_profile
-rw-r--r--. 1 mageshm mageshm 124 May 11 2012 .bashrc
-rw-r--r--. 1 root root 26 Dec 27 17:55 liks
-rw-r--r--. 1 root root 104857600 Jan 31 2006 test100.dat
-rw-r--r--. 1 root root 104874307 Dec 30 2012 test100.zip
-rw-r--r--. 1 root root 11536384 Dec 30 2012 test10.zip
-rw-r--r--. 1 root root 61 Dec 27 19:05 test2-bzip2.txt
-rw-r--r--. 1 root root 61 Dec 31 14:24 test3-bzip2.txt
-rw-r--r--. 1 root root 60 Dec 27 19:01 test-bzip2.txt
```
#### How to view the Directory files in Linux?
Use the below command to view the Directory files in Linux. Directory files are available everywhere in Linux filesystem. The Directory files colour is `BLUE`
```
# ls -la | grep ^d
drwxr-xr-x. 3 mageshm mageshm 4096 Dec 31 14:24 links/
drwxrwxr-x. 2 mageshm mageshm 4096 Nov 16 15:44 perl5/
drwxr-xr-x. 2 mageshm mageshm 4096 Nov 16 15:37 public_ftp/
drwxr-xr-x. 3 mageshm mageshm 4096 Nov 16 15:37 public_html/
```
#### How to view the Link files in Linux?
Use the below command to view the Link files in Linux. Link files are available everywhere in Linux filesystem.
Two type of link files are available, its Soft link and Hard link. The Link files color is `LIGHT TURQUOISE`
```
# ls -la | grep ^l
lrwxrwxrwx. 1 root root 31 Dec 7 15:11 s-link-file -> /links/soft-link/test-soft-link
lrwxrwxrwx. 1 root root 38 Dec 7 15:12 s-link-folder -> /links/soft-link/test-soft-link-folder
```
#### How to view the Character Device files in Linux?
Use the below command to view the Character Device files in Linux. Character Device files are available only in specific location.
Its available under `/dev` directory. The Character Device files color is `YELLOW`
```
# ls -la | grep ^c
crw-------. 1 root root 5, 1 Jan 28 14:05 console
crw-rw----. 1 root root 10, 61 Jan 28 14:05 cpu_dma_latency
crw-rw----. 1 root root 10, 62 Jan 28 14:05 crash
crw-rw----. 1 root root 29, 0 Jan 28 14:05 fb0
crw-rw-rw-. 1 root root 1, 7 Jan 28 14:05 full
crw-rw-rw-. 1 root root 10, 229 Jan 28 14:05 fuse
```
#### How to view the Block files in Linux?
Use the below command to view the Block files in Linux. The Block files are available only in specific location.
Its available under `/dev` directory. The Block files color is `YELLOW`
```
# ls -la | grep ^b
brw-rw----. 1 root disk 7, 0 Jan 28 14:05 loop0
brw-rw----. 1 root disk 7, 1 Jan 28 14:05 loop1
brw-rw----. 1 root disk 7, 2 Jan 28 14:05 loop2
brw-rw----. 1 root disk 7, 3 Jan 28 14:05 loop3
brw-rw----. 1 root disk 7, 4 Jan 28 14:05 loop4
```
#### How to view the Socket files in Linux?
Use the below command to view the Socket files in Linux. The Socket files are available only in specific location.
The Socket files color is `PINK`
```
# ls -la | grep ^s
srw-rw-rw- 1 root root 0 Jan 5 16:36 system_bus_socket
```
#### How to view the Named Pipe files in Linux?
Use the below command to view the Named Pipe files in Linux. The Named Pipe files are available only in specific location. The Named Pipe files color is `YELLOW`
```
# ls -la | grep ^p
prw-------. 1 root root 0 Jan 28 14:06 replication-notify-fifo|
prw-------. 1 root root 0 Jan 28 14:06 stats-mail|
```
### Method-2: How to Identify File types in Linux Using file Command?
The file command allow us to determine various file types in Linux. There are three sets of tests, performed in this order: filesystem tests, magic tests, and language tests to identify file types.
#### How to view the Regular files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Regular file. The file command will read the given file contents and display exactly what kind of file it is.
Thats why we are seeing different results for each Regular files. See the below various results for Regular files.
```
# file 2daygeek_access.log
2daygeek_access.log: ASCII text, with very long lines
# file powertop.html
powertop.html: HTML document, ASCII text, with very long lines
# file 2g-test
2g-test: JSON data
# file powertop.txt
powertop.txt: HTML document, UTF-8 Unicode text, with very long lines
# file 2g-test-05-01-2019.tar.gz
2g-test-05-01-2019.tar.gz: gzip compressed data, last modified: Sat Jan 5 18:22:20 2019, from Unix, original size 450560
```
#### How to view the Directory files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Directory file. See the results below.
```
# file Pictures/
Pictures/: directory
```
#### How to view the Link files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Link file. See the results below.
```
# file log
log: symbolic link to /run/systemd/journal/dev-log
```
#### How to view the Character Device files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Character Device file. See the results below.
```
# file vcsu
vcsu: character special (7/64)
```
#### How to view the Block files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Block file. See the results below.
```
# file sda1
sda1: block special (8/1)
```
#### How to view the Socket files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Socket file. See the results below.
```
# file system_bus_socket
system_bus_socket: socket
```
#### How to view the Named Pipe files in Linux Using file Command?
Simple enter the file command on your terminal and followed by Named Pipe file. See the results below.
```
# file pipe-test
pipe-test: fifo (named pipe)
```
### Method-3: How to Identify File types in Linux Using stat Command?
The stat command allow us to check file types or file system status. This utility giving more information than file command. It shows lot of information about the given file such as Size, Block Size, IO Block Size, Inode Value, Links, File permission, UID, GID, File Access, Modify and Change time details.
#### How to view the Regular files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Regular file.
```
# stat 2daygeek_access.log
File: 2daygeek_access.log
Size: 14406929 Blocks: 28144 IO Block: 4096 regular file
Device: 10301h/66305d Inode: 1727555 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2019-01-03 14:05:26.430328867 +0530
Modify: 2019-01-03 14:05:26.460328868 +0530
Change: 2019-01-03 14:05:26.460328868 +0530
Birth: -
```
#### How to view the Directory files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Directory file. See the results below.
```
# stat Pictures/
File: Pictures/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 10301h/66305d Inode: 1703982 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2018-11-24 03:22:11.090000828 +0530
Modify: 2019-01-05 18:27:01.546958817 +0530
Change: 2019-01-05 18:27:01.546958817 +0530
Birth: -
```
#### How to view the Link files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Link file. See the results below.
```
# stat /dev/log
File: /dev/log -> /run/systemd/journal/dev-log
Size: 28 Blocks: 0 IO Block: 4096 symbolic link
Device: 6h/6d Inode: 278 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-01-05 16:36:31.033333447 +0530
Modify: 2019-01-05 16:36:30.766666768 +0530
Change: 2019-01-05 16:36:30.766666768 +0530
Birth: -
```
#### How to view the Character Device files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Character Device file. See the results below.
```
# stat /dev/vcsu
File: /dev/vcsu
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 6h/6d Inode: 16 Links: 1 Device type: 7,40
Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 5/ tty)
Access: 2019-01-05 16:36:31.056666781 +0530
Modify: 2019-01-05 16:36:31.056666781 +0530
Change: 2019-01-05 16:36:31.056666781 +0530
Birth: -
```
#### How to view the Block files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Block file. See the results below.
```
# stat /dev/sda1
File: /dev/sda1
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: 6h/6d Inode: 250 Links: 1 Device type: 8,1
Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 994/ disk)
Access: 2019-01-05 16:36:31.596666806 +0530
Modify: 2019-01-05 16:36:31.596666806 +0530
Change: 2019-01-05 16:36:31.596666806 +0530
Birth: -
```
#### How to view the Socket files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Socket file. See the results below.
```
# stat /var/run/dbus/system_bus_socket
File: /var/run/dbus/system_bus_socket
Size: 0 Blocks: 0 IO Block: 4096 socket
Device: 15h/21d Inode: 576 Links: 1
Access: (0666/srw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-01-05 16:36:31.823333482 +0530
Modify: 2019-01-05 16:36:31.810000149 +0530
Change: 2019-01-05 16:36:31.810000149 +0530
Birth: -
```
#### How to view the Named Pipe files in Linux Using stat Command?
Simple enter the stat command on your terminal and followed by Named Pipe file. See the results below.
```
# stat pipe-test
File: pipe-test
Size: 0 Blocks: 0 IO Block: 4096 fifo
Device: 10301h/66305d Inode: 1705583 Links: 1
Access: (0644/prw-r--r--) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2019-01-06 02:00:03.040394731 +0530
Modify: 2019-01-06 02:00:03.040394731 +0530
Change: 2019-01-06 02:00:03.040394731 +0530
Birth: -
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/how-to-understand-and-identify-file-types-in-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[liujing97](https://github.com/liujing97)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972

View File

@ -1,154 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Using Square Brackets in Bash: Part 1)
[#]: via: (https://www.linux.com/blog/2019/3/using-square-brackets-bash-part-1)
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
Using Square Brackets in Bash: Part 1
======
![square brackets][1]
This tutorial tackle square brackets and how they are used in different contexts at the command line.
[Creative Commons Zero][2]
After taking a look at [how curly braces (`{}`) work on the command line][3], now its time to tackle brackets (`[]`) and see how they are used in different contexts.
### Globbing
The first and easiest use of square brackets is in _globbing_. You have probably used globbing before without knowing it. Think of all the times you have listed files of a certain type, say, you wanted to list JPEGs, but not PNGs:
```
ls *.jpg
```
Using wildcards to get all the results that fit a certain pattern is precisely what we call globbing.
In the example above, the asterisk means " _zero or more characters_ ". There is another globbing wildcard, `?`, which means " _exactly one character_ ", so, while
```
ls d*k*
```
will list files called _darkly_ and _ducky_ (and _dark_ and _duck_ \-- remember `*` can also be zero characters),
```
ls d*k?
```
will not list _darkly_ (or _dark_ or _duck_ ), but it will list _ducky_.
Square brackets are used in globbing for sets of characters. To see what this means, make directory in which to carry out tests, `cd` into it and create a bunch of files like this:
```
touch file0{0..9}{0..9}
```
(If you don't know why that works, [take a look at the last installment that explains curly braces `{}`][3]).
This will create files _file000_ , _file001_ , _file002_ , etc., through _file097_ , _file098_ and _file099_.
Then, to list the files in the 70s and 80s, you can do this:
```
ls file0[78]?
```
To list _file022_ , _file027_ , _file028_ , _file052_ , _file057_ , _file058_ , _file092_ , _file097_ , and _file98_ you can do this:
```
ls file0[259][278]
```
Of course, you can use globbing (and square brackets for sets) for more than just `ls`. You can use globbing with any other tool for listing, removing, moving, or copying files, although the last two may require a bit of lateral thinking.
Let's say you want to create duplicates of files _file010_ through _file029_ and call the copies _archive010_ , _archive011_ , _archive012_ , etc..
You can't do:
```
cp file0[12]? archive0[12]?
```
Because globbing is for matching against existing files and directories and the _archive..._ files don't exist yet.
Doing this:
```
cp file0[12]? archive0[1..2][0..9]
```
won't work either, because `cp` doesn't let you copy many files to other many new files. Copying many files only works if you are copying them to a directory, so this:
```
mkdir archive
cp file0[12]? archive
```
would work, but it would copy the files, using their same names, into a directory called _archive/_. This is not what you set out to do.
However, if you look back at [the article on curly braces (`{}`)][3], you will remember how you can use `%` to lop off the end of a string contained in a variable.
Of course, there is a way you can also lop of the beginning of string contained in a variable. Instead of `%`, you use `#`.
For practice, you can try this:
```
myvar="Hello World"
echo Goodbye Cruel ${myvar#Hello}
```
It prints " _Goodbye Cruel World_ " because `#Hello` gets rid of the _Hello_ part at the beginning of the string stored in `myvar`.
You can use this feature alongside your globbing tools to make your _archive_ duplicates:
```
for i in file0[12]?;\
do\
cp $i archive${i#file};\
done
```
The first line tells the Bash interpreter that you want to loop through all the files that contain the string _file0_ followed by the digits _1_ or _2_ , and then one other character, which can be anything. The second line `do` indicates that what follows is the instruction or list of instructions you want the interpreter to loop through.
Line 3 is where the actually copying happens, and you use the contents of the loop variable _`i`_ **twice: First, straight out, as the first parameter of the `cp` command, and then you add _archive_ to its contents, while at the same time cutting of _file_. So, if _`i`_ contains, say, _file019_...
```
"archive" + "file019" - "file" = "archive019"
```
the `cp` line is expanded to this:
```
cp file019 archive019
```
Finally, notice how you can use the backslash `\` to split a chain of commands over several lines for clarity.
In part two, well look at more ways to use square brackets. Stay tuned.
--------------------------------------------------------------------------------
via: https://www.linux.com/blog/2019/3/using-square-brackets-bash-part-1
作者:[Paul Brown][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/users/bro66
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/square-gabriele-diwald-475007-unsplash.jpg?itok=cKmysLfd (square brackets)
[2]: https://www.linux.com/LICENSES/CATEGORY/CREATIVE-COMMONS-ZERO
[3]: https://www.linux.com/blog/learn/2019/2/all-about-curly-braces-bash

View File

@ -1,86 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (tomjlw)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Streaming internet radio with RadioDroid)
[#]: via: (https://opensource.com/article/19/4/radiodroid-internet-radio-player)
[#]: author: (Chris Hermansen (Community Moderator) https://opensource.com/users/clhermansen)
Streaming internet radio with RadioDroid
======
Listen to your favorite internet radio stations over your home stereo
with this easy setup.
![woman programming][1]
Online news outlets have recently lamented the [passing of Google's Chromecast Audio device][2]. The device received [favorable reviews][3] in the audio press, so I had already been thinking about acquiring one. Given the news of Chromecast's demise, I decided to look for one at a reasonable price—before they were all snapped up or thrown in the dumpster.
I found one at [MobileFun][4] and put in my order. The device eventually arrived, packaged in the usual serviceable but minimal Google wrapping, with a very brief Get Started guide printed on the outside.
![Google Chromecast Audio][5]
I cabled it to my home stereo via my digital-analog converter's optical S/PDIF connection, hoping that would provide the best sound quality.
The setup ran flawlessly, and in about five minutes I was ready to play some tunes. I knew that a number of Android applications support Chromecast, so I decided to test it out with Google Play Music; sure enough, it worked just fine and sounded quite good. However, being an open source kind of person, I decided to see what I could find in the way of open source players that work with Chromecast.
### RadioDroid to the rescue
The [RadioDroid Android application][6] fit the bill. It is open source and available on [GitHub][7], Google Play, and [F-Droid][8]. According to the documentation, RadioDroid looks up and plays streams from the [Community Radio Browser][9] website. So I decided to install it on my handset and give it a shot.
![RadioDroid][10]
The installation was quick and smooth, and RadioDroid opened rapidly to display local stations. You can see the Chromecast button (the icon that looks like a rectangle with wavefronts) near the top-right side of this screenshot.
I played around with a few of the local stations. The application reliably played music on my handset's speaker, but I had to futz around with the Chromecast button to get the music to stream over the Chromecast. But stream it did!
I decided to seek out my favorite internet radio station, [Radio Grenouille][11] in Marseille, France. There are various ways to find stations in RadioDroid. One is to use the tabs—Local, Topclick, etc.—located above the list of stations. One of the tabs is Countries; I found France, with some 1,500 stations, on the list and scrolled—and scrolled, and scrolled—down through the list to find Radio Grenouille. Another way is to use the Search button at the top of the screen; the search was rapid and returned that wonderful radio station. I tried a few other searches, and they all returned reasonable info.
Going back to the Local tab, I scrolled through the listings and learned that "local" seems to be defined as "in the same country." So, even though Seattle, Portland, San Francisco, Los Angeles, and Juneau are closer to my home than Toronto, I didn't see any of them in Local. However, by using Search, I could find all stations with "Seattle" in their name.
The Languages tab let me find all stations broadcasting in Portugues, Portuguese, Português, Português Brasil, Português do Brasil, Portuguẽs, and Portugês. I quickly found another favorite station, [91 Rock Curitiba][12].
Then inspiration struck—it's springtime, but who cares? Let's listen to some Christmas music. And sure enough, searching for Christmas led me to [181.FM Christmas Blender][13]. Well, a minute or two of that was enough for me…
So, all in all, I recommend the RadioDroid and Chromecast combo as a nice way to play internet radio on a home stereo at a reasonable cost.
### As for the music…
Recently I picked up an interesting album of very ambient (even beatless) music called [Continuum One][14] by [Qua Continuum][15] from the [Blue Coast Music][16] store. Blue Coast has a lot to offer the open source music enthusiast: music is available by download (and sometimes physical format) without resorting to those grotesque platform-specific download managers; it typically provides several formats, including WAV, FLAC, and DSD; different word lengths and bitrates are provided for WAV and FLAC, including 16/44.1, 24/96, and 24/192, and for DSD, 2.8, 5.6, and 11.2 MHz; and the music is recorded with great care using wonderful facilities. Unfortunately, I don't find a lot of music there to my taste, though I like a few of the artists available on Blue Coast, including Qua Continuum, [Art Lande][17], and [Alex De Grassi][18].
Over on [Bandcamp][19], I picked up [Emancipator's Baralku][20] and [Framework's Tides][21], both of which I enjoy. The music created by these two artists hits my sweet spot—it's electronic but not (generally) dance, it's melodic, and it tends to have some great hooks. There are many things for open source aficionados to like about Bandcamp, such as the ability to listen to the work in its entirety before buying; the lack of bloatware downloaders; the amounts shared with the musicians; and its support for [Creative Commons music][22].
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/radiodroid-internet-radio-player
作者:[Chris Hermansen (Community Moderator)][a]
选题:[lujun9972][b]
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (woman programming)
[2]: https://www.theverge.com/2019/1/11/18178751/google-chromecast-audio-discontinued-sale
[3]: https://www.whathifi.com/google/chromecast-audio/review
[4]: https://www.mobilefun.com/google-chromecast-audio-black-70476
[5]: https://opensource.com/sites/default/files/uploads/internet-radio_chromecast.png (Google Chromecast Audio)
[6]: https://play.google.com/store/apps/details?id=net.programmierecke.radiodroid2
[7]: https://github.com/segler-alex/RadioDroid
[8]: https://f-droid.org/en/packages/net.programmierecke.radiodroid2/
[9]: http://www.radio-browser.info/gui/#!/
[10]: https://opensource.com/sites/default/files/uploads/internet-radio_radiodroid.png (RadioDroid)
[11]: http://www.radiogrenouille.com/
[12]: https://91rock.com.br/
[13]: http://player.181fm.com/?station=181-xblender
[14]: https://www.youtube.com/watch?v=PqLCQXPS8iQ
[15]: https://bluecoastmusic.com/artists/qua-continuum
[16]: https://bluecoastmusic.com/store
[17]: https://bluecoastmusic.com/store?f%5B0%5D=search_api_multi_aggregation_1%3Aart%20lande
[18]: https://bluecoastmusic.com/store?f%5B0%5D=search_api_multi_aggregation_1%3Aalex%20de%20grassi
[19]: https://bandcamp.com/
[20]: https://emancipator.bandcamp.com/album/baralku
[21]: https://frameworksuk.bandcamp.com/album/tides
[22]: https://bandcamp.com/tag/creative-commons

View File

@ -0,0 +1,360 @@
[#]: collector: (lujun9972)
[#]: translator: (liujing97)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (How To Understand And Identify File types in Linux)
[#]: via: (https://www.2daygeek.com/how-to-understand-and-identify-file-types-in-linux/)
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
怎样理解和识别 Linux 中的文件类型
======
众所周知,在 Linux 中一切皆为文件,包括硬盘和显卡等。
在 Linux 中导航时,大部分的文件都普通文件和目录文件。
但是它也有其他的类型,对应 5 类不同的作用。
所以,理解 Linux 中的文件类型在许多方面都是非常重要的。
如果你不相信,那只需要浏览全文,就会发现它有多重要。
如果你不能理解文件类型,就不能够毫无畏惧的做任意的修改。
如果你做了一些错误的修改,以至于毁坏了你的文件系统,那么当你操作的时候请小心一点。
在 Linux 系统中文件是非常重要的,因为所有的设备和守护进程都被存储为文件。
### 在 Linux 中有多少种可用类型?
据我所知,在 Linux 中总共有 7 种可用类型的文件,分为 3 大类。细节如下。
* 普通文件
* 目录文件
* 特殊文件(该类有五个类型的文件)
* 链接文件
* 字符设备文件
* Socket 文件
* 命名管道文件
* 块文件
参考下面的表可以更好地理解 Linux 中的文件类型。
| 符号  | 意义                  |
|    | 普通文件。以下划线 "_" 开头。       |
| d   | 目录文件。以英文字母 "d" 开头。     |
| l   | 链接文件。以英文字母 "l" 开头。      |
| c   | 字符设备文件。以英文字母 "c" 开头。    |
| s   | Socket 文件。以英文字母 "s" 开头。     |
| p   | 命名管道文件。以英文字母 "p" 开头。    |
| b   | 块文件。以英文字母 "b" 开头。       |
### 方法1:手动识别 Linux 中的文件类型
如果你很了解 Linux那么你可以借助上表很容易地识别文件类型。
#### 在 Linux 中如何查看普通文件?
在 Linux 中使用下面的命令去查看普通文件。在 Linux 文件系统中普通文件是随处可用的。
普通文件的颜色是`白色`
```
# ls -la | grep ^-
-rw-------. 1 mageshm mageshm 1394 Jan 18 15:59 .bash_history
-rw-r--r--. 1 mageshm mageshm 18 May 11 2012 .bash_logout
-rw-r--r--. 1 mageshm mageshm 176 May 11 2012 .bash_profile
-rw-r--r--. 1 mageshm mageshm 124 May 11 2012 .bashrc
-rw-r--r--. 1 root root 26 Dec 27 17:55 liks
-rw-r--r--. 1 root root 104857600 Jan 31 2006 test100.dat
-rw-r--r--. 1 root root 104874307 Dec 30 2012 test100.zip
-rw-r--r--. 1 root root 11536384 Dec 30 2012 test10.zip
-rw-r--r--. 1 root root 61 Dec 27 19:05 test2-bzip2.txt
-rw-r--r--. 1 root root 61 Dec 31 14:24 test3-bzip2.txt
-rw-r--r--. 1 root root 60 Dec 27 19:01 test-bzip2.txt
```
#### 在 Linux 中如何查看目录文件?
在 Linux 中使用下面的命令去查看目录文件。在 Linux 文件系统中目录文件是随处可用的。目录文件的颜色是`蓝色`
```
# ls -la | grep ^d
drwxr-xr-x. 3 mageshm mageshm 4096 Dec 31 14:24 links/
drwxrwxr-x. 2 mageshm mageshm 4096 Nov 16 15:44 perl5/
drwxr-xr-x. 2 mageshm mageshm 4096 Nov 16 15:37 public_ftp/
drwxr-xr-x. 3 mageshm mageshm 4096 Nov 16 15:37 public_html/
```
#### 在 Linux 中如何查看链接文件?
在 Linux 中使用下面的命令去查看链接文件。在 Linux 文件系统中链接文件是随处可用的。
链接文件有两种可用类型,软连接和硬链接。链接文件的颜色是`浅绿宝石色`
```
# ls -la | grep ^l
lrwxrwxrwx. 1 root root 31 Dec 7 15:11 s-link-file -> /links/soft-link/test-soft-link
lrwxrwxrwx. 1 root root 38 Dec 7 15:12 s-link-folder -> /links/soft-link/test-soft-link-folder
```
#### 在 Linux 中如何查看字符设备文件?
在 Linux 中使用下面的命令查看字符设备文件。字符设备文件仅在特定位置是可用的。
它在目录 `/dev` 下是可用的。字符设备文件的颜色是`黄色`
```
# ls -la | grep ^c
crw-------. 1 root root 5, 1 Jan 28 14:05 console
crw-rw----. 1 root root 10, 61 Jan 28 14:05 cpu_dma_latency
crw-rw----. 1 root root 10, 62 Jan 28 14:05 crash
crw-rw----. 1 root root 29, 0 Jan 28 14:05 fb0
crw-rw-rw-. 1 root root 1, 7 Jan 28 14:05 full
crw-rw-rw-. 1 root root 10, 229 Jan 28 14:05 fuse
```
#### 在 Linux 中如何查看块文件?
在 Linux 中使用下面的命令查看块文件。块文件仅在特定位置是可用的。
它在目录 `/dev` 中可用。块文件的颜色是`黄色`
```
# ls -la | grep ^b
brw-rw----. 1 root disk 7, 0 Jan 28 14:05 loop0
brw-rw----. 1 root disk 7, 1 Jan 28 14:05 loop1
brw-rw----. 1 root disk 7, 2 Jan 28 14:05 loop2
brw-rw----. 1 root disk 7, 3 Jan 28 14:05 loop3
brw-rw----. 1 root disk 7, 4 Jan 28 14:05 loop4
```
#### 在 Linux 中如何查看 Socket 文件?
在 Linux 中使用下面的命令查看 Socket 文件。Socket 文件仅在特定位置是可用的。
Scoket 文件的颜色是`粉色`
```
# ls -la | grep ^s
srw-rw-rw- 1 root root 0 Jan 5 16:36 system_bus_socket
```
#### 在 Linux 中如何查看命名管道文件?
在 Linux 中使用下面的命令查看命名管道文件。命名管道文件仅在特定位置是可用的。命名管道文件的颜色是`黄色`
```
# ls -la | grep ^p
prw-------. 1 root root 0 Jan 28 14:06 replication-notify-fifo|
prw-------. 1 root root 0 Jan 28 14:06 stats-mail|
```
### 方法2:在 Linux 中如何使用 file 命令识别文件类型
在 Linux 中 file 命令允许我们去定义不同的文件类型。这里有三个测试集按此顺序进行三组测试文件系统测试magic 测试和用于识别文件类型的语言测试。
#### 在 Linux 中如何使用 file 命令查看普通文件
在你的终端简单地输入 file 命令接着输入普通文件。file 命令将会读取提供的文件内容并且准确地显示文件的类型。
这就是我们看到对于每个普通文件有不同结果的原因。参考下面普通文件的不同结果。
```
# file 2daygeek_access.log
2daygeek_access.log: ASCII text, with very long lines
# file powertop.html
powertop.html: HTML document, ASCII text, with very long lines
# file 2g-test
2g-test: JSON data
# file powertop.txt
powertop.txt: HTML document, UTF-8 Unicode text, with very long lines
# file 2g-test-05-01-2019.tar.gz
2g-test-05-01-2019.tar.gz: gzip compressed data, last modified: Sat Jan 5 18:22:20 2019, from Unix, original size 450560
```
#### 在 Linux 中如何使用 file 命令查看目录文件?
在你的终端简单地输入 file 命令,接着输入目录文件。参阅下面的结果。
```
# file Pictures/
Pictures/: directory
```
#### 在 Linux 中如何使用 file 命令查看链接文件?
在你的终端简单地输入 file 命令,接着输入链接文件。参阅下面的结果。
```
# file log
log: symbolic link to /run/systemd/journal/dev-log
```
#### 在 Linux 中如何使用 file 命令查看字符设备文件?
在你的终端简单地输入 file 命令,接着输入字符设备文件。参阅下面的结果。
```
# file vcsu
vcsu: character special (7/64)
```
#### 在 Linux 中如何使用 file 命令查看块文件?
在你的终端简单地输入 file 命令,接着输入块文件。参阅下面的结果。
```
# file sda1
sda1: block special (8/1)
```
#### 在 Linux 中如何使用 file 命令查看 Socket 文件?
在你的终端简单地输入 file 命令,接着输入 Socket 文件。参阅下面的结果。
```
# file system_bus_socket
system_bus_socket: socket
```
#### 在 Linux 中如何使用 file 命令查看命名管道文件?
在你的终端简单地输入 file 命令,接着输入命名管道文件。参阅下面的结果。
```
# file pipe-test
pipe-test: fifo (named pipe)
```
### 方法 3在 Linux 中如何使用 stat 命令识别文件类型?
stat 命令允许我们去查看文件类型或文件系统状态。该实用程序比 file 命令提供更多的信息。它显示文件的大量信息例如大小、块大小、IO 块大小、节点值、链接、文件权限、UID, GID, 文件访问、更新和修改的时间详细信息。
#### 在 Linux 中如何使用 stat 命令查看普通文件?
在你的终端简单地输入 stat 命令,接着输入普通文件。参阅下面的结果。
```
# stat 2daygeek_access.log
File: 2daygeek_access.log
Size: 14406929 Blocks: 28144 IO Block: 4096 regular file
Device: 10301h/66305d Inode: 1727555 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2019-01-03 14:05:26.430328867 +0530
Modify: 2019-01-03 14:05:26.460328868 +0530
Change: 2019-01-03 14:05:26.460328868 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看目录文件?
在你的终端简单地输入 stat 命令,接着输入目录文件。参阅下面的结果。
```
# stat Pictures/
File: Pictures/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 10301h/66305d Inode: 1703982 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2018-11-24 03:22:11.090000828 +0530
Modify: 2019-01-05 18:27:01.546958817 +0530
Change: 2019-01-05 18:27:01.546958817 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看链接文件?
在你的终端简单地输入 stat 命令,接着输入链接文件。参阅下面的结果。
```
# stat /dev/log
File: /dev/log -> /run/systemd/journal/dev-log
Size: 28 Blocks: 0 IO Block: 4096 symbolic link
Device: 6h/6d Inode: 278 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-01-05 16:36:31.033333447 +0530
Modify: 2019-01-05 16:36:30.766666768 +0530
Change: 2019-01-05 16:36:30.766666768 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看字符设备文件?
在你的终端简单地输入 stat 命令,接着输入字符设备文件。参阅下面的结果。
```
# stat /dev/vcsu
File: /dev/vcsu
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 6h/6d Inode: 16 Links: 1 Device type: 7,40
Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 5/ tty)
Access: 2019-01-05 16:36:31.056666781 +0530
Modify: 2019-01-05 16:36:31.056666781 +0530
Change: 2019-01-05 16:36:31.056666781 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看块文件?
在你的终端简单地输入 stat 命令,接着输入块文件。参阅下面的结果。
```
# stat /dev/sda1
File: /dev/sda1
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: 6h/6d Inode: 250 Links: 1 Device type: 8,1
Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 994/ disk)
Access: 2019-01-05 16:36:31.596666806 +0530
Modify: 2019-01-05 16:36:31.596666806 +0530
Change: 2019-01-05 16:36:31.596666806 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看 Socket 文件?
在你的终端简单地输入 stat 命令,接着输入 Socket 文件。参阅下面的结果。
```
# stat /var/run/dbus/system_bus_socket
File: /var/run/dbus/system_bus_socket
Size: 0 Blocks: 0 IO Block: 4096 socket
Device: 15h/21d Inode: 576 Links: 1
Access: (0666/srw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-01-05 16:36:31.823333482 +0530
Modify: 2019-01-05 16:36:31.810000149 +0530
Change: 2019-01-05 16:36:31.810000149 +0530
Birth: -
```
#### 在 Linux 中如何使用 stat 命令查看命名管道文件?
在你的终端简单地输入 stat 命令,接着输入命名管道文件。参阅下面的结果。
```
# stat pipe-test
File: pipe-test
Size: 0 Blocks: 0 IO Block: 4096 fifo
Device: 10301h/66305d Inode: 1705583 Links: 1
Access: (0644/prw-r--r--) Uid: ( 1000/ daygeek) Gid: ( 1000/ daygeek)
Access: 2019-01-06 02:00:03.040394731 +0530
Modify: 2019-01-06 02:00:03.040394731 +0530
Change: 2019-01-06 02:00:03.040394731 +0530
Birth: -
```
--------------------------------------------------------------------------------
via: https://www.2daygeek.com/how-to-understand-and-identify-file-types-in-linux/
作者:[Magesh Maruthamuthu][a]
选题:[lujun9972][b]
译者:[liujing97](https://github.com/liujing97)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.2daygeek.com/author/magesh/
[b]: https://github.com/lujun9972

View File

@ -0,0 +1,149 @@
[#]: collector: (lujun9972)
[#]: translator: (HankChow)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Using Square Brackets in Bash: Part 1)
[#]: via: (https://www.linux.com/blog/2019/3/using-square-brackets-bash-part-1)
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
在 Bash 中使用方括号 [第 1 节]
======
![square brackets][1]
> 这篇文章将要介绍方括号及其在命令行中的用法。
看完[花括号在命令行中的用法][3]之后,现在我们继续来看方括号(`[]`)在上下文中是如何发挥作用的。
### <ruby>通配<rt>Globbing</rt></ruby>
方括号最简单的用法就是通配。你可能在知道“通配”这个概念之前就已经通过通配来匹配内容了,列出具有相同特征的多个文件就是一个很常见的场景,例如列出所有 JPEG 文件:
```
ls *.jpg
```
使用<ruby>通配符<rt>wildcard</rt></ruby>来得到符合某个模式的所有内容,这个过程就叫通配。
在上面的例子当中,星号(`*`就代表“0 个或多个字符”。除此以外,还有代表“有且仅有一个字符”的问号(`?`)。因此
```
ls d*k*
```
可以列出 `darkly``ducky`,而且 `dark``duck` 也是可以被列出的,因为 `*` 可以匹配 0 个字符。而
```
ls d*k?
```
则只能列出 `ducky`,不会列出 `darkly`、`dark` 和 `duck`
方括号也可以用于通配。为了便于演示,可以创建一个用于测试的目录,并在这个目录下创建文件:
```
touch file0{0..9}{0..9}
```
(如果你还不清楚上面这个命令的原理,可以看一下[另一篇介绍花括号的文章][3]
执行上面这个命令之后,就会创建 `file000`、`file001`、……、`file099` 这 100 个文件。
如果要列出这些文件当中第二位数字是 7 或 8 的文件,可以执行:
```
ls file0[78]?
```
如果要列出 `file022`、`file027`、`file028`、`file052`、`file057`、`file058`、`file092`、`file097`、`file098`,可以执行:
```
ls file0[259][278]
```
当然,不仅仅是 `ls`,很多其它的命令行工具都可以使用方括号来进行通配操作。但在删除文件、移动文件、复制文件的过程中使用通配,你需要有一点横向思维。
例如将 `file010``file029` 这 30 个文件复制成 `archive010``archive029` 这 30 个副本,不可以这样执行:
```
cp file0[12]? archive0[12]?
```
因为通配只能针对已有的文件,而 archive 开头的文件并不存在,不能进行通配。
而这条命令
```
cp file0[12]? archive0[1..2][0..9]
```
也同样不行,因为 `cp` 并不允许将多个文件复制到多个文件。在复制多个文件的情况下,只能将多个文件复制到一个指定的目录下:
```
mkdir archive
cp file0[12]? archive
```
这条命令是可以正常运行的,但它只会把这 30 个文件以同样的名称复制到 `archive/` 目录下,而这并不是我们想要的效果。
如果你阅读过我[关于花括号的文章][3],你大概会记得可以使用 `%` 来截掉字符串的末尾部分,而使用 `#` 则可以截掉字符串的开头部分。
例如:
```
myvar="Hello World"
echo Goodbye Cruel ${myvar#Hello}
```
就会输出 `Goodbye Cruel World`,因为 `#Hello``myvar` 变量中开头的 `Hello` 去掉了。
在通配的过程中,也可以使用这一个技巧。
```
for i in file0[12]?;\
do\
cp $i archive${i#file};\
done
```
上面的第一行命令告诉 Bash 需要对所有 `file01` 开头或者 `file02` 开头,且后面只跟一个任意字符的文件进行操作,第二行的 `do` 和第四行的 `done` 代表需要对这些文件都执行这一块中的命令。
第三行就是实际的复制操作了,这里使用了两次 `$i` 变量:第一次在 `cp` 命令中直接作为源文件的文件名使用,第二次则是截掉文件名开头的 `file` 部分,然后在开头补上一个 `archive`,也就是这样:
```
"archive" + "file019" - "file" = "archive019"
```
最终整个 `cp` 命令是这样的:
```
cp file019 archive019
```
最后,顺带说明一下反斜杠 `\` 的作用是将一条长命令拆分成多行,这样可以方便阅读。
在下一节,我们会了解方括号的更多用法,敬请关注。
--------------------------------------------------------------------------------
via: https://www.linux.com/blog/2019/3/using-square-brackets-bash-part-1
作者:[Paul Brown][a]
选题:[lujun9972][b]
译者:[HankChow](https://github.com/HankChow)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.linux.com/users/bro66
[b]: https://github.com/lujun9972
[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/square-gabriele-diwald-475007-unsplash.jpg?itok=cKmysLfd "square brackets"
[2]: https://www.linux.com/LICENSES/CATEGORY/CREATIVE-COMMONS-ZERO
[3]: https://www.linux.com/blog/learn/2019/2/all-about-curly-braces-bash

View File

@ -0,0 +1,86 @@
[#]: collector: (lujun9972)
[#]: translator: (tomjlw)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Streaming internet radio with RadioDroid)
[#]: via: (https://opensource.com/article/19/4/radiodroid-internet-radio-player)
[#]: author: (Chris Hermansen (Community Moderator) https://opensource.com/users/clhermansen)
使用 RadioDroid 流传输网络广播
======
通过简单的设置使用你家中的音响收听你最爱的网络电台
![编程中的女士][1]
最近在线新闻通讯社对 [Google 的 Chromecast 音频设备的推出][2]发出哀叹。该设备在音频媒体界受到[好评][3],因此我已经在考虑入手一个。基于 Chromecast 毁灭的消息,我决定在它们全部被打包扔进垃圾堆之前以一个合理价位买一个。
我在 [MobileFun][4] 上找到一个放进我的订单中。这个设备最终到货了。它被包在一个常用但是最简的 Google 包装袋中,外面打印着非常简短的开始指南。
![Google Chromecast 音频][5]
我用光缆把它通过我的数模转换器的光学 S/PDIF 连接接入家庭音响,希望以此能提供最佳的音质。
安装过程并无纰漏,在五分钟后我就准备好播放一些音乐了。我知道一些安卓应用支持 Chromecast因此我决定用 Google Play 音乐测试它。意料之中,它工作得不错,音乐效果听上去也相当好。然而作为一个具有开源精神的人,我决定看看我能找到什么开源播放器能兼容 Chromecast。
### RadioDroid 的救赎
[RadioDroid Android application][6] 满足条件。它开源并且可从 [GitHub][7]Google Play 以及 [F-Droid][8] 上获取。根据帮助文档RadioDroid 从 [Community Radio Browser][9] 网页寻找播放流。因此我决定在我的手机上安装尝试一下。
![RadioDroid][10]
安装过程快速平滑RadioDroid 打开展示当地电台十分迅速。你可以在这个屏幕截图的右上方附近看到 Chromecast 按钮(看上去像一个有着波阵面的长方形图标)。
我尝试了几个当地电台。应用可靠地在我手机喇叭上播放了音乐。但是我不得不摆弄 Chromecast 按钮来通过 Chromecast 把音乐传到流上。但是它确实可以做到流传输。
我决定找一些我最爱的网络广播电台,在法国马赛的 [格雷诺耶广播电台][11]。在 RadioDroid 上有许多找到电台的方法。其中一种是使用标签——当地最流行等——就在电台列表上方。其中一个标签是国家我找到法国在其1500个电台中划来划去寻找格雷诺耶广播电台。另一种办法是使用屏幕上方的查询按钮查询迅速找到了那家美妙的电台。我尝试了其它几次查询它们都返回了合理的信息。
回到当地标签,我在列表中翻来覆去,发现“当地”的定义似乎是“在同一个国家”。因此尽管西雅图,波特兰,旧金山,洛杉矶和朱诺比多伦多更靠近我的家,我并没有在当地标签中看到它们。然而通过使用查询功能,我可以发现所有名字中带有西雅图的电台。
语言标签使我找到所有用葡语(及葡语方言)播报的电台。我很快发现了另一个最爱的电台 [91 Rock Curitiba][12]。
接着灵感来了,现在是春天了但又如何呢?让我们听一些圣诞音乐。意料之中,搜寻圣诞把我引到了 [181.FM Christmas Blender][13]。不错,一两分钟的欣赏对我就够了。
因此总的来说,我推荐 RadioDroid 和 Chromecast 的组合作为一种用家庭音响以合理价位播放网络电台的良好方式、
### 对于音乐方面。。。
最近我从 [Blue Coast Music][16] 商店里选了一个 [Qua Continuum][15] 创作的叫作 [Continuum One][14] 的有趣的氛围(甚至无节拍)音乐专辑。
Blue Coast 有许多可提供给开源音乐爱好者的。音乐可以无需通过那些奇怪的平台专用下载管理器下载(有时以物理形式)。它通常提供几种形式,包括 WAVFLAC 和 DSD为 WAV 和 FLAC 提供不同的字长和比特率,包括 16/44.124/96和24/192针对 DSD 则有2.85.6和11.2 MHz。音乐是用优秀的仪器精心录制的。不幸的是我并没有找到许多符合我口味的音乐尽管我喜欢 Blue Coast 上能获取的几个艺术家,包括 Qua Continuum[Art Lande][17] 以及 [Alex De Grassi][18]。
在 [Bandcamp][19] 上,我挑选了 [Emancipator's Baralku][20] 和 [Framework's Tides][21],两个都是我喜欢的。两位艺术家创作的音乐符合我的口味——电音但又不(总体来说)是舞蹈,他们的音乐旋律优美,副歌也很好听。有许多可以让开源音乐发烧友爱上 Bandcamp 的东西比如买前试听整首歌的服务;没有垃圾软件下载器;大量与音乐家的合作;以及对 [Creative Commons music][22] 的支持。
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/4/radiodroid-internet-radio-player
作者:[Chris Hermansen (Community Moderator)][a]
选题:[lujun9972][b]
译者:[tomjlw](https://github.com/tomjlw)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/clhermansen
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (woman programming)
[2]: https://www.theverge.com/2019/1/11/18178751/google-chromecast-audio-discontinued-sale
[3]: https://www.whathifi.com/google/chromecast-audio/review
[4]: https://www.mobilefun.com/google-chromecast-audio-black-70476
[5]: https://opensource.com/sites/default/files/uploads/internet-radio_chromecast.png (Google Chromecast Audio)
[6]: https://play.google.com/store/apps/details?id=net.programmierecke.radiodroid2
[7]: https://github.com/segler-alex/RadioDroid
[8]: https://f-droid.org/en/packages/net.programmierecke.radiodroid2/
[9]: http://www.radio-browser.info/gui/#!/
[10]: https://opensource.com/sites/default/files/uploads/internet-radio_radiodroid.png (RadioDroid)
[11]: http://www.radiogrenouille.com/
[12]: https://91rock.com.br/
[13]: http://player.181fm.com/?station=181-xblender
[14]: https://www.youtube.com/watch?v=PqLCQXPS8iQ
[15]: https://bluecoastmusic.com/artists/qua-continuum
[16]: https://bluecoastmusic.com/store
[17]: https://bluecoastmusic.com/store?f%5B0%5D=search_api_multi_aggregation_1%3Aart%20lande
[18]: https://bluecoastmusic.com/store?f%5B0%5D=search_api_multi_aggregation_1%3Aalex%20de%20grassi
[19]: https://bandcamp.com/
[20]: https://emancipator.bandcamp.com/album/baralku
[21]: https://frameworksuk.bandcamp.com/album/tides
[22]: https://bandcamp.com/tag/creative-commons