Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet152/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   148   149   150   151   152   153   154   155   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 107 
]
Even better, we can run:
ls -l /etc
This gives us the contents in a long list, which I think is much easier to understand. 
It will show each directory or file entry on its own line, along with the permission 
string. But, you probably already remember 
ls
 as well as 
ls -l
 from back in 
Chapter 
2

Managing Users and Permissions
, so I won't go into too much more detail here. The 
-l
 portion of the 
ls
 command in that example is known as an 
argument
. I'm not 
referring to an argument such as the ever-ensuing debate in the Linux community 
over which command-line text editor is the best between Vim and Emacs (it's clearly 
Vim). Instead, I'm referring to the concept of an argument in shell commands that 
allow you to override the defaults, or feed options to the command in some way, 
such as in this example, where we format the output of 
ls
 to be in a long list.
The 
rm
 command is another one that we touched on in 
Chapter 2

Managing Users and 
Permissions
, when we were discussing manually removing the home directory of a 
user that was removed from the system. So, at this point, you're probably well aware 
of that command and 
what it does (it removes files and directories). It's a potentially 
dangerous command, as you could use it to accidentally remove something that you 
shouldn't have. In that chapter, we used the following command to remove the home 
directory of user 
dscully
:
rm -r /home/dscully
As you can see, we're using the 
-r
 argument to alter the behavior of the 
rm
 
command, which, by default, doesn't remove directories but only files. The 
-r
 
argument instructs 
rm
 to remove everything recursively, even if it's a directory. The 
-r
 argument will also remove subdirectories of the path as well, so you'll definitely 
want to be careful with this command. As I've mentioned earlier in the book, if you 
use 
sudo
 with 
rm
, you can hypothetically delete your entire Ubuntu installation!
Another option offered by 
rm
 is the 
-f
 argument which is short for 
force
, and it tells 
rm
 not to prompt before removing things. This argument won't be needed as often, 
and use cases for it are outside the scope of this chapter. But keep in mind that it 
exists, should you need it.


Navigating and Essential Commands

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   148   149   150   151   152   153   154   155   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish