mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
20131101-2 选题
This commit is contained in:
parent
5674237a56
commit
2712f78e1e
172
sources/10 Lesser Known Linux Commands – Part 2.md
Normal file
172
sources/10 Lesser Known Linux Commands – Part 2.md
Normal file
@ -0,0 +1,172 @@
|
||||
10 Lesser Known Linux Commands – Part 2
|
||||
================================================================================
|
||||
Continuing the last conversation from [11 Lesser Known Useful Linux Commands – Part I][1](注:此文已经被其他网站翻译,链接:[http://www.searchsv.com.cn/showcontent_77595.htm][2]或者:[http://www.oschina.net/translate/11-lesser-known-useful-linux-commands][5]) here in this article we will be focusing on other lesser known Linux commands, that will prove to be very much useful in managing Desktop and Server.
|
||||
|
||||
![](http://www.tecmint.com/wp-content/uploads/2013/10/10-Lesser-Known-Commands.png)
|
||||
|
||||
*10 Lesser Known Linux Commands*
|
||||
|
||||
### 12. <space> Command ###
|
||||
|
||||
Every piece of command you type in terminal gets recorded in the **history** and can be retried using **history** command.
|
||||
|
||||
How about cheating [history command][2]? Yeah you can do it and its very easy. Just put one or more white space before typing a command in terminal and your command wont be recorded.
|
||||
|
||||
Lets give it a try, we will try five common Linux commands (say** ls, pwd, uname, echo “hi”** and **who**) in terminal after one white space and check if these commands are docked in history or not.
|
||||
|
||||
avi@localhost:~$ ls
|
||||
avi@localhost:~$ pwd
|
||||
avi@localhost:~$ uname
|
||||
avi@localhost:~$ echo “hi”
|
||||
avi@localhost:~$ who
|
||||
|
||||
Now run ‘**history**‘ command to see whether these above executed commands are recorded or not.
|
||||
|
||||
avi@localhost:~$ history
|
||||
|
||||
40 cd /dev/
|
||||
41 ls
|
||||
42 dd if=/dev/cdrom1 of=/home/avi/Desktop/squeeze.iso
|
||||
43 ping www.google.com
|
||||
44 su
|
||||
|
||||
You see our last executed commands are not logged. we can also cheat history by using an alternate command ‘**cat | bash**‘ of-course without quotes, in the same way as above.
|
||||
|
||||
### 13. stat Command ###
|
||||
|
||||
The **stat** command in Linux displays the status information of a file or filesystem. The **stat** shows a whole lot of information about the file which name is passed as argument. Status Information includes file **Size, Blocks, Access Permission, Date-time** of file last access, **Modify, change**, etc.
|
||||
|
||||
avi@localhost:~$ stat 34.odt
|
||||
|
||||
File: `34.odt'
|
||||
Size: 28822 Blocks: 64 IO Block: 4096 regular file
|
||||
Device: 801h/2049d Inode: 5030293 Links: 1
|
||||
Access: (0644/-rw-r--r--) Uid: ( 1000/ avi) Gid: ( 1000/ avi)
|
||||
Access: 2013-10-14 00:17:40.000000000 +0530
|
||||
Modify: 2013-10-01 15:20:17.000000000 +0530
|
||||
Change: 2013-10-01 15:20:17.000000000 +0530
|
||||
|
||||
### 14. <alt>. and <esc>. ###
|
||||
|
||||
The above key combination is not actually a command but a tweak which put the last command argument at prompt, in the order of last entered command to previous entered command. Just press and hold ‘**Alt**‘ or ‘**Esc**‘ and continue pressing ‘**.**‘.
|
||||
|
||||
### 15. pv command ###
|
||||
|
||||
You might have seen simulating text in **Movies** specially **Hollywood Movies**, where the text appears as if it is being typed in the Real time. You can echo any kind of text and output in simulating fashion using ‘**pv**‘ command, as pipelined above. The **pv** command might not be installed in your system, and you have to **apt** or **yum** the required packages to install ‘**pv**‘ into your box.
|
||||
|
||||
root@localhost:# echo "Tecmint [dot] com is the world's best website for qualitative Linux article" | pv -qL 20
|
||||
|
||||
**Sample Outpit**
|
||||
|
||||
Tecmint [dot] com is the world's best website for qualitative Linux article
|
||||
|
||||
### 16. mount | column -t ###
|
||||
|
||||
The above command shows the list of all the mounted filesystem in a nice formatting with specification.
|
||||
|
||||
avi@localhost:~$ mount | column -t
|
||||
|
||||
**Sample Outpit**
|
||||
|
||||
/dev/sda1on / type ext3 (rw,errors=remount-ro)
|
||||
tmpfson /lib/init/rw type tmpfs(rw,nosuid,mode=0755)
|
||||
proc on /proc type proc (rw,noexec,nosuid,nodev)
|
||||
sysfson /sys type sysfs(rw,noexec,nosuid,nodev)
|
||||
udev on /dev type tmpfs(rw,mode=0755)
|
||||
tmpfson /dev/shm type tmpfs(rw,nosuid,nodev)
|
||||
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
|
||||
fusectl on /sys/fs/fuse/connections type fusectl (rw)
|
||||
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
|
||||
nfsd on /proc/fs/nfsd type nfsd (rw)
|
||||
|
||||
### 17. Ctr+l command ###
|
||||
|
||||
Before going further, let me ask you how you clear your terminal. Hmmm! You type “**clear**” at prompt. Well the above command perform the action of cleaning your terminal all at a once. Just press “**Ctr+l**” and see how it clears your terminal all at once.
|
||||
|
||||
### 18. curl command ###
|
||||
|
||||
How about checking your **unread mail** from the **command line**. This command is very useful for those who work on headless server. Again it asks for password at run time and you need not hard code your password in the above line, which is otherwise a security risk.
|
||||
|
||||
avi@localhost:~$ curl -u avishek1210@gmail.com --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if //; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
|
||||
|
||||
**Sample Outpit**
|
||||
|
||||
Enter host password for user 'avishek1210@gmail.com':
|
||||
Gmail - Inbox for avishek1210@gmail.com
|
||||
People offering cars in Delhi - Oct 26
|
||||
Quikr Alerts
|
||||
another dependency question
|
||||
Chris Bannister
|
||||
Ralf Mardorf
|
||||
Reco
|
||||
Brian
|
||||
François Patte
|
||||
Curt
|
||||
Siard
|
||||
berenger.morel
|
||||
Hi Avishek - Download your Free MBA Brochure Now...
|
||||
Diya
|
||||
★Top Best Sellers Of The Week, Take Your Pick★
|
||||
Timesdeal
|
||||
aptitude misconfigure?
|
||||
Glenn English
|
||||
Choosing Debian version or derivative to run Wine when resource poor
|
||||
Chris Bannister
|
||||
Zenaan Harkness
|
||||
Curt
|
||||
Tom H
|
||||
Richard Owlett
|
||||
Ralf Mardorf
|
||||
Rob Owens
|
||||
|
||||
### 19. screen Command ###
|
||||
|
||||
The **screen** command makes it possible to detach a long running process from a session that can again be reattached, as and when required which provides flexibility in command execution.
|
||||
|
||||
To run a process (long) we generally execute as
|
||||
|
||||
avi@localhost:~$ ./long-unix-script.sh
|
||||
|
||||
Which lacks flexibility and needs the user to continue with the current session, however if we execute the above command as.
|
||||
|
||||
avi@localhost:~$ screen ./long-unix-script.sh
|
||||
|
||||
It can be **de-attached** or **re-attached** in different sessions. When a command is executing press “**Ctrl + A**” and then “**d”** to **de-attach**. To attach run.
|
||||
|
||||
avi@localhost:~$ screen -r 4980.pts-0.localhost
|
||||
|
||||
**Note**: Here, the later part of this command is **screen id**, which you can get using ‘**screen -ls**‘ command. To know more about ‘**screen command**‘ and their usage, please read our article that shows some useful [10 screen commands with examples][4].
|
||||
|
||||
### 20. file ###
|
||||
|
||||
No! the above command is not a typo. ‘**file**‘ is a command which gives you information about the type of file.
|
||||
|
||||
avi@localhost:~$ file 34.odt
|
||||
34.odt: OpenDocument Text
|
||||
|
||||
### 21. id ###
|
||||
|
||||
The above command print real and effective **user** and **group** ids.
|
||||
|
||||
avi@localhost:~$ id
|
||||
|
||||
**Sample Output**
|
||||
|
||||
uid=1000(avi) gid=1000(avi)
|
||||
groups=1000(avi),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),111(bluetooth),117(scanner)
|
||||
|
||||
That’s all for now. Seeing the success of last article of this series and this very article, I’ll be coming with another part of this article containing several other **Lesser Known Linux** commands very soon. Till then **Stay Tuned** and connected to **Tecmint**. Don’t Forget to provide us with your **value-able Feedback** in **Comments**.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.tecmint.com/10-lesser-known-linux-commands-part-2/
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.tecmint.com/11-lesser-known-useful-linux-commands/
|
||||
[2]:http://www.searchsv.com.cn/showcontent_77595.htm
|
||||
[3]:http://www.tecmint.com/history-command-examples/
|
||||
[4]:http://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/
|
||||
[5]:http://www.oschina.net/translate/11-lesser-known-useful-linux-commands
|
@ -0,0 +1,45 @@
|
||||
Seven reasons why closed source is better than open source, or so it seems
|
||||
================================================================================
|
||||
![](http://opensource.com/sites/default/files/imagecache/image-full-size/images/business/BUSINESS_asusual_deadend.png)
|
||||
|
||||
It might seem strange coming from the founder of OpenLogic, a company focused on helping others succeed with open source, but the fact is that closed source is better than open source in certain situations.
|
||||
|
||||
With closed source…
|
||||
|
||||
**1. You never have to fix components when something goes wrong.**
|
||||
|
||||
With any software, things occasionally go wrong. When this happens with open source software, you, or an engineer who owes you a favor, may need to spend time debugging the problem. This entails reading through code, working with an open source community, or your open source support provider, and applying a fix. With closed source, on the other hand, once you determine that the problem lies in your vendor's code, you're all done! All you have to do is file a ticket and wait. Sure, you may have to wait a few months or years for the fix, and sometimes it never comes at all, but there's nothing you can do about that! Just kick back, relax, and hope for the best.
|
||||
|
||||
**2. You don't have to worry about contributing your changes back to a community.**
|
||||
|
||||
With open source, there's an expectation that if you fix a bug or make an improvement, you'll contribute your code back to the community that can help test and maintain it over time. With closed source, you never have to contribute anything to anybody. Of course, that's because you can't change the code as you don't have access to it, but you may create your own workarounds to problems you run into. Sure, you might have to keep working around the same issues version after version, but at least you never have to work with the community to make the solution better for others.
|
||||
|
||||
**3. You don't have to think about open source licensing terms and compliance issues.**
|
||||
|
||||
With open source, you have to comply with the license terms specified by the components you're using. It can take some time to understand the terms of an Apache Software License versus a General Public License (GPL), for example. Depending on which open source components you use and how you use them (e.g., distributing to third parties or using only for internal purposes), different license terms may apply (e.g., attributing the open source component in your documentation). Companies like OpenLogic make it easy to understand and comply with open source licensing terms, but with closed source, you don't have to worry about any of this! Your vendor's license agreement takes away all of your rights to the software and makes it nearly impossible to consider any usage not explicitly approved by your corporate attorneys, so you don't even have to think about it. Sure, you have to deal with license counting, surprise software compliance audits, terms that worsen over time, and nearly incomprehensible legalese, but at least you don't have to understand how you're using open source components.
|
||||
|
||||
**4. You don't have to choose among dozens of options for every component.**
|
||||
|
||||
Open source offers lots of solutions when considering a database, web server, application server, programming language, GUI framework, and the like. In practically every category, you can find robust offerings built in a variety of languages with different architectural approaches. It's also very common to find similar tools that are optimized for different use cases (e.g., performance versus scalability versus simplicity). To make sure a tool will work best for your particular use case, download it and give it a try. With closed source, you don't have to contend with so many options. You only have to explore two or three large vendors in each market. You can save time if the vendors don't offer free trials, or make it hard to get started by forcing you to pay for a trial or sign trial agreements up front.
|
||||
|
||||
**5. You don't have to look around for slideshows.**
|
||||
|
||||
It can take some time to find conference presentations, architectural diagrams, screenshots, and other documentation for any software, but with open source you might have to read wikis, forums, and email lists to get the information you need about a particular component. With closed source, you're never more than a phone call away from a nice PowerPoint presentation delivered right in the comfort of your office by professional salespeople in nice suits. Sure, you'll have to provide your contact information up front and the salespeople will never stop calling you, but at least you don't have to search the web for glossy slides with beautiful graphics.
|
||||
|
||||
**6. You don't have to look around for technical support.**
|
||||
|
||||
You can get open source support from a community, your own engineers, or professional open source support organizations. It can take some time to decide whether you want Service Level Agreement (SLA) support with guaranteed response times like you can get from OpenLogic, or if you feel comfortable posting issues to mailing lists or doing your own support. With closed source, you never have to worry about where you're going to get support. Sure, you might not ever get to speak to an actual engineer, but at least you always know who to call.
|
||||
|
||||
**7. You can just throw in the towel.**
|
||||
|
||||
With open source, there's always a way to get something fixed, patched, improved, enhanced, refactored, upgraded, or rewritten. There's no easy way to throw up your arms and walk away like there is with closed source. Sure, you can curse the community that developed the open source component causing you problems, but you can usually work around the issue, get help from the community or a support organization, or even fix the issue yourself. It's just not nearly as satisfying as cursing a commercial vendor and calling it a day.
|
||||
|
||||
So, there you have it. Seven good reasons why closed source is better than open source. Do you have others you'd like to share?
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://opensource.com/business/13/10/seven-reasons-closed-better-than-open-source
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,31 @@
|
||||
The Halloween Documents: Microsoft's Anti-Linux Strategy 15 Years Later
|
||||
================================================================================
|
||||
> It's been 15 years since leaked memos revealed Microsoft's anti-Linux and open source strategy. Here's how it failed.
|
||||
|
||||
![](http://thevarguy.com/site-files/thevarguy.com/files/imagecache/medium_img/uploads/2013/10/trickortreat2.jpg)
|
||||
|
||||
It's almost Halloween—which marks 15 years since Eric S. Raymond published the first leaked "[Halloween Documents][1]" documenting Microsoft's (MSFT) secret strategy to compete with Linux and open source. A lot has changed since then, when terms such as "fear, uncertainty and doubt" (FUD) first exploded into the lexicon. But how much remains the same? Do Microsoft and open source play nicely today?
|
||||
|
||||
The Halloween Documents, so-called because the first one leaked in October 1998, don't actually have much to do with Halloween itself—which I find sad, as an avid fan of the holiday. But for understanding the historical relationship between Microsoft and open source, the memos are vital.
|
||||
|
||||
They were the first to reveal the particularly nasty "tricks" Microsoft planned in its effort to contain the open source movement, and to prevent Linux in particular from cutting too deeply into its revenue. One key strategy for the company was implementing proprietary protocols to lock customers into Microsoft software. Another was touting Microsoft software as offering lower total cost of ownership (TCO) than Linux, even though the documents showed that Microsoft itself found Linux to be the cheaper overall solution in many cases.
|
||||
|
||||
History, however, has proven Microsoft's strategy largely wrong. Fifteen years after Raymond published the first of the documents (he subsequently added several more to his site, along with extensive commentary), which Microsoft later acknowleded to be authentic, Windows and Linux continue to coexist. And while Linux and open source never became an existential threat to Microsoft, as the Halloween Documents suggest executives at the company once feared, it's hard to deny that they have significantly curtailed the company's share of important markets, like servers operating systems and applications, for many years. Microsoft might be a richer enterprise today if it had achieved the goals it articulated in the Halloween Documents.
|
||||
|
||||
And the story's not over. Today, the flashpoints between Microsoft and open source have shifted in many ways, and Redmond has few reasons to worry about Linux replacing its flagship software for desktop computers. But in the mobile world, Linux-based Android, alongside iOS, constitutes a major challenge for Microsoft's vision of dominating tablets and smartphones. The cloud and Big Data, too, are increasingly the domain of open source software, with solutions including Hadoop and OpenStack facing few real challenges from Microsoft or any other proprietary competitor. In different ways but for the same essential reasons, the open source ecosystem remains a thorn in Microsoft's side.
|
||||
|
||||
Of course, Microsoft today is no longer the company it was in 1998. The era of its unbridled expansion ended long ago, and it's hard to imagine any disruption big enough to pose a serious challenge to its dominance within the huge market for desktop operating systems and office software. If the company ever does face decline, it is much likelier to be the result not of Linux but of a structural shift away from traditional computing altogether—and such a change will not come anytime soon.
|
||||
|
||||
For today, though, the Halloween Documents are worth revisiting as a reminder of how not to respond to competition from open source code. In the long run, companies that have embraced open source technologies and developed business models that thrive on the sharing of software, such as Red Hat (RHT), will do better than those that attempt to protect their interests through FUD and vendor lock-in. Red Hat today has much smoother and potentially more lucrative options for continued growth in the areas of open source dominance mentioned above—such as the cloud and Big Data—than Microsoft or even Apple, which face expensive and riskier investment in new types of hardware if they hope to expand their business.
|
||||
|
||||
The lesson: Sharing—whether of candy or software—is the way to go. Happy Halloween!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://thevarguy.com/open-source-application-software-companies/halloween-documents-microsofts-anti-linux-strategy-15-yea
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[1]:http://www.catb.org/~esr/halloween/
|
Loading…
Reference in New Issue
Block a user