创建文件默认最大权限为666 (-rw-rw-rw-),默认创建的文件没有可执行权限x位。

创建目录默认最大权限777(-rwx-rwx-rwx),默认创建的目录属主是有x权限,允许用户进入。

简单的python脚本计算umask对应的文件和目录权限

  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #author:xiaoxiaoleo
  4. #url:http://www.cnblogs.com/xiaoxiaoleo/
  5.  
  6. import itertools
  7.  
  8. def file_perm(umask):
  9. out_per_list = []
  10. in_perm_list = ''
  11. umask_list = list(umask)
  12. for num in range(len(umask_list)):
  13. if (int(umask_list[num]) % 2) == 0:
  14. out_per_list.append(int(in_perm_list[num]) - int(umask_list[num]))
  15. if (int(umask_list[num]) % 2) != 0:
  16. out_per_list.append(int(in_perm_list[num]) - int(umask_list[num]) + 1 )
  17.  
  18. return ''.join(str(i) for i in out_per_list)
  19.  
  20. def dir_perm(umask):
  21. out_per_list = []
  22. in_perm_list = ''
  23. umask_list = list(umask)
  24. for num in range(len(umask_list)):
  25. out_per_list.append(int(in_perm_list[num]) - int(umask_list[num]))
  26.  
  27. return ''.join(str(i) for i in out_per_list)
  28.  
  29. def calc_perm(umask):
  30. print 'umask:%s file:%s dir:%s' % (umask,file_perm(umask),dir_perm(umask))
  31.  
  32. if __name__ == '__main__':
  33. calc_perm('')

umask与文件目录权限对照表

  1. umask:000 file:666 dir:777
  2. umask:001 file:666 dir:776
  3. umask:002 file:664 dir:775
  4. umask:003 file:664 dir:774
  5. umask:004 file:662 dir:773
  6. umask:005 file:662 dir:772
  7. umask:006 file:660 dir:771
  8. umask:007 file:660 dir:770
  9. umask:010 file:666 dir:767
  10. umask:011 file:666 dir:766
  11. umask:012 file:664 dir:765
  12. umask:013 file:664 dir:764
  13. umask:014 file:662 dir:763
  14. umask:015 file:662 dir:762
  15. umask:016 file:660 dir:761
  16. umask:017 file:660 dir:760
  17. umask:020 file:646 dir:757
  18. umask:021 file:646 dir:756
  19. umask:022 file:644 dir:755
  20. umask:023 file:644 dir:754
  21. umask:024 file:642 dir:753
  22. umask:025 file:642 dir:752
  23. umask:026 file:640 dir:751
  24. umask:027 file:640 dir:750
  25. umask:030 file:646 dir:747
  26. umask:031 file:646 dir:746
  27. umask:032 file:644 dir:745
  28. umask:033 file:644 dir:744
  29. umask:034 file:642 dir:743
  30. umask:035 file:642 dir:742
  31. umask:036 file:640 dir:741
  32. umask:037 file:640 dir:740
  33. umask:040 file:626 dir:737
  34. umask:041 file:626 dir:736
  35. umask:042 file:624 dir:735
  36. umask:043 file:624 dir:734
  37. umask:044 file:622 dir:733
  38. umask:045 file:622 dir:732
  39. umask:046 file:620 dir:731
  40. umask:047 file:620 dir:730
  41. umask:050 file:626 dir:727
  42. umask:051 file:626 dir:726
  43. umask:052 file:624 dir:725
  44. umask:053 file:624 dir:724
  45. umask:054 file:622 dir:723
  46. umask:055 file:622 dir:722
  47. umask:056 file:620 dir:721
  48. umask:057 file:620 dir:720
  49. umask:060 file:606 dir:717
  50. umask:061 file:606 dir:716
  51. umask:062 file:604 dir:715
  52. umask:063 file:604 dir:714
  53. umask:064 file:602 dir:713
  54. umask:065 file:602 dir:712
  55. umask:066 file:600 dir:711
  56. umask:067 file:600 dir:710
  57. umask:070 file:606 dir:707
  58. umask:071 file:606 dir:706
  59. umask:072 file:604 dir:705
  60. umask:073 file:604 dir:704
  61. umask:074 file:602 dir:703
  62. umask:075 file:602 dir:702
  63. umask:076 file:600 dir:701
  64. umask:077 file:600 dir:700
  65. umask:100 file:666 dir:677
  66. umask:101 file:666 dir:676
  67. umask:102 file:664 dir:675
  68. umask:103 file:664 dir:674
  69. umask:104 file:662 dir:673
  70. umask:105 file:662 dir:672
  71. umask:106 file:660 dir:671
  72. umask:107 file:660 dir:670
  73. umask:110 file:666 dir:667
  74. umask:111 file:666 dir:666
  75. umask:112 file:664 dir:665
  76. umask:113 file:664 dir:664
  77. umask:114 file:662 dir:663
  78. umask:115 file:662 dir:662
  79. umask:116 file:660 dir:661
  80. umask:117 file:660 dir:660
  81. umask:120 file:646 dir:657
  82. umask:121 file:646 dir:656
  83. umask:122 file:644 dir:655
  84. umask:123 file:644 dir:654
  85. umask:124 file:642 dir:653
  86. umask:125 file:642 dir:652
  87. umask:126 file:640 dir:651
  88. umask:127 file:640 dir:650
  89. umask:130 file:646 dir:647
  90. umask:131 file:646 dir:646
  91. umask:132 file:644 dir:645
  92. umask:133 file:644 dir:644
  93. umask:134 file:642 dir:643
  94. umask:135 file:642 dir:642
  95. umask:136 file:640 dir:641
  96. umask:137 file:640 dir:640
  97. umask:140 file:626 dir:637
  98. umask:141 file:626 dir:636
  99. umask:142 file:624 dir:635
  100. umask:143 file:624 dir:634
  101. umask:144 file:622 dir:633
  102. umask:145 file:622 dir:632
  103. umask:146 file:620 dir:631
  104. umask:147 file:620 dir:630
  105. umask:150 file:626 dir:627
  106. umask:151 file:626 dir:626
  107. umask:152 file:624 dir:625
  108. umask:153 file:624 dir:624
  109. umask:154 file:622 dir:623
  110. umask:155 file:622 dir:622
  111. umask:156 file:620 dir:621
  112. umask:157 file:620 dir:620
  113. umask:160 file:606 dir:617
  114. umask:161 file:606 dir:616
  115. umask:162 file:604 dir:615
  116. umask:163 file:604 dir:614
  117. umask:164 file:602 dir:613
  118. umask:165 file:602 dir:612
  119. umask:166 file:600 dir:611
  120. umask:167 file:600 dir:610
  121. umask:170 file:606 dir:607
  122. umask:171 file:606 dir:606
  123. umask:172 file:604 dir:605
  124. umask:173 file:604 dir:604
  125. umask:174 file:602 dir:603
  126. umask:175 file:602 dir:602
  127. umask:176 file:600 dir:601
  128. umask:177 file:600 dir:600
  129. umask:200 file:466 dir:577
  130. umask:201 file:466 dir:576
  131. umask:202 file:464 dir:575
  132. umask:203 file:464 dir:574
  133. umask:204 file:462 dir:573
  134. umask:205 file:462 dir:572
  135. umask:206 file:460 dir:571
  136. umask:207 file:460 dir:570
  137. umask:210 file:466 dir:567
  138. umask:211 file:466 dir:566
  139. umask:212 file:464 dir:565
  140. umask:213 file:464 dir:564
  141. umask:214 file:462 dir:563
  142. umask:215 file:462 dir:562
  143. umask:216 file:460 dir:561
  144. umask:217 file:460 dir:560
  145. umask:220 file:446 dir:557
  146. umask:221 file:446 dir:556
  147. umask:222 file:444 dir:555
  148. umask:223 file:444 dir:554
  149. umask:224 file:442 dir:553
  150. umask:225 file:442 dir:552
  151. umask:226 file:440 dir:551
  152. umask:227 file:440 dir:550
  153. umask:230 file:446 dir:547
  154. umask:231 file:446 dir:546
  155. umask:232 file:444 dir:545
  156. umask:233 file:444 dir:544
  157. umask:234 file:442 dir:543
  158. umask:235 file:442 dir:542
  159. umask:236 file:440 dir:541
  160. umask:237 file:440 dir:540
  161. umask:240 file:426 dir:537
  162. umask:241 file:426 dir:536
  163. umask:242 file:424 dir:535
  164. umask:243 file:424 dir:534
  165. umask:244 file:422 dir:533
  166. umask:245 file:422 dir:532
  167. umask:246 file:420 dir:531
  168. umask:247 file:420 dir:530
  169. umask:250 file:426 dir:527
  170. umask:251 file:426 dir:526
  171. umask:252 file:424 dir:525
  172. umask:253 file:424 dir:524
  173. umask:254 file:422 dir:523
  174. umask:255 file:422 dir:522
  175. umask:256 file:420 dir:521
  176. umask:257 file:420 dir:520
  177. umask:260 file:406 dir:517
  178. umask:261 file:406 dir:516
  179. umask:262 file:404 dir:515
  180. umask:263 file:404 dir:514
  181. umask:264 file:402 dir:513
  182. umask:265 file:402 dir:512
  183. umask:266 file:400 dir:511
  184. umask:267 file:400 dir:510
  185. umask:270 file:406 dir:507
  186. umask:271 file:406 dir:506
  187. umask:272 file:404 dir:505
  188. umask:273 file:404 dir:504
  189. umask:274 file:402 dir:503
  190. umask:275 file:402 dir:502
  191. umask:276 file:400 dir:501
  192. umask:277 file:400 dir:500
  193. umask:300 file:466 dir:477
  194. umask:301 file:466 dir:476
  195. umask:302 file:464 dir:475
  196. umask:303 file:464 dir:474
  197. umask:304 file:462 dir:473
  198. umask:305 file:462 dir:472
  199. umask:306 file:460 dir:471
  200. umask:307 file:460 dir:470
  201. umask:310 file:466 dir:467
  202. umask:311 file:466 dir:466
  203. umask:312 file:464 dir:465
  204. umask:313 file:464 dir:464
  205. umask:314 file:462 dir:463
  206. umask:315 file:462 dir:462
  207. umask:316 file:460 dir:461
  208. umask:317 file:460 dir:460
  209. umask:320 file:446 dir:457
  210. umask:321 file:446 dir:456
  211. umask:322 file:444 dir:455
  212. umask:323 file:444 dir:454
  213. umask:324 file:442 dir:453
  214. umask:325 file:442 dir:452
  215. umask:326 file:440 dir:451
  216. umask:327 file:440 dir:450
  217. umask:330 file:446 dir:447
  218. umask:331 file:446 dir:446
  219. umask:332 file:444 dir:445
  220. umask:333 file:444 dir:444
  221. umask:334 file:442 dir:443
  222. umask:335 file:442 dir:442
  223. umask:336 file:440 dir:441
  224. umask:337 file:440 dir:440
  225. umask:340 file:426 dir:437
  226. umask:341 file:426 dir:436
  227. umask:342 file:424 dir:435
  228. umask:343 file:424 dir:434
  229. umask:344 file:422 dir:433
  230. umask:345 file:422 dir:432
  231. umask:346 file:420 dir:431
  232. umask:347 file:420 dir:430
  233. umask:350 file:426 dir:427
  234. umask:351 file:426 dir:426
  235. umask:352 file:424 dir:425
  236. umask:353 file:424 dir:424
  237. umask:354 file:422 dir:423
  238. umask:355 file:422 dir:422
  239. umask:356 file:420 dir:421
  240. umask:357 file:420 dir:420
  241. umask:360 file:406 dir:417
  242. umask:361 file:406 dir:416
  243. umask:362 file:404 dir:415
  244. umask:363 file:404 dir:414
  245. umask:364 file:402 dir:413
  246. umask:365 file:402 dir:412
  247. umask:366 file:400 dir:411
  248. umask:367 file:400 dir:410
  249. umask:370 file:406 dir:407
  250. umask:371 file:406 dir:406
  251. umask:372 file:404 dir:405
  252. umask:373 file:404 dir:404
  253. umask:374 file:402 dir:403
  254. umask:375 file:402 dir:402
  255. umask:376 file:400 dir:401
  256. umask:377 file:400 dir:400
  257. umask:400 file:266 dir:377
  258. umask:401 file:266 dir:376
  259. umask:402 file:264 dir:375
  260. umask:403 file:264 dir:374
  261. umask:404 file:262 dir:373
  262. umask:405 file:262 dir:372
  263. umask:406 file:260 dir:371
  264. umask:407 file:260 dir:370
  265. umask:410 file:266 dir:367
  266. umask:411 file:266 dir:366
  267. umask:412 file:264 dir:365
  268. umask:413 file:264 dir:364
  269. umask:414 file:262 dir:363
  270. umask:415 file:262 dir:362
  271. umask:416 file:260 dir:361
  272. umask:417 file:260 dir:360
  273. umask:420 file:246 dir:357
  274. umask:421 file:246 dir:356
  275. umask:422 file:244 dir:355
  276. umask:423 file:244 dir:354
  277. umask:424 file:242 dir:353
  278. umask:425 file:242 dir:352
  279. umask:426 file:240 dir:351
  280. umask:427 file:240 dir:350
  281. umask:430 file:246 dir:347
  282. umask:431 file:246 dir:346
  283. umask:432 file:244 dir:345
  284. umask:433 file:244 dir:344
  285. umask:434 file:242 dir:343
  286. umask:435 file:242 dir:342
  287. umask:436 file:240 dir:341
  288. umask:437 file:240 dir:340
  289. umask:440 file:226 dir:337
  290. umask:441 file:226 dir:336
  291. umask:442 file:224 dir:335
  292. umask:443 file:224 dir:334
  293. umask:444 file:222 dir:333
  294. umask:445 file:222 dir:332
  295. umask:446 file:220 dir:331
  296. umask:447 file:220 dir:330
  297. umask:450 file:226 dir:327
  298. umask:451 file:226 dir:326
  299. umask:452 file:224 dir:325
  300. umask:453 file:224 dir:324
  301. umask:454 file:222 dir:323
  302. umask:455 file:222 dir:322
  303. umask:456 file:220 dir:321
  304. umask:457 file:220 dir:320
  305. umask:460 file:206 dir:317
  306. umask:461 file:206 dir:316
  307. umask:462 file:204 dir:315
  308. umask:463 file:204 dir:314
  309. umask:464 file:202 dir:313
  310. umask:465 file:202 dir:312
  311. umask:466 file:200 dir:311
  312. umask:467 file:200 dir:310
  313. umask:470 file:206 dir:307
  314. umask:471 file:206 dir:306
  315. umask:472 file:204 dir:305
  316. umask:473 file:204 dir:304
  317. umask:474 file:202 dir:303
  318. umask:475 file:202 dir:302
  319. umask:476 file:200 dir:301
  320. umask:477 file:200 dir:300
  321. umask:500 file:266 dir:277
  322. umask:501 file:266 dir:276
  323. umask:502 file:264 dir:275
  324. umask:503 file:264 dir:274
  325. umask:504 file:262 dir:273
  326. umask:505 file:262 dir:272
  327. umask:506 file:260 dir:271
  328. umask:507 file:260 dir:270
  329. umask:510 file:266 dir:267
  330. umask:511 file:266 dir:266
  331. umask:512 file:264 dir:265
  332. umask:513 file:264 dir:264
  333. umask:514 file:262 dir:263
  334. umask:515 file:262 dir:262
  335. umask:516 file:260 dir:261
  336. umask:517 file:260 dir:260
  337. umask:520 file:246 dir:257
  338. umask:521 file:246 dir:256
  339. umask:522 file:244 dir:255
  340. umask:523 file:244 dir:254
  341. umask:524 file:242 dir:253
  342. umask:525 file:242 dir:252
  343. umask:526 file:240 dir:251
  344. umask:527 file:240 dir:250
  345. umask:530 file:246 dir:247
  346. umask:531 file:246 dir:246
  347. umask:532 file:244 dir:245
  348. umask:533 file:244 dir:244
  349. umask:534 file:242 dir:243
  350. umask:535 file:242 dir:242
  351. umask:536 file:240 dir:241
  352. umask:537 file:240 dir:240
  353. umask:540 file:226 dir:237
  354. umask:541 file:226 dir:236
  355. umask:542 file:224 dir:235
  356. umask:543 file:224 dir:234
  357. umask:544 file:222 dir:233
  358. umask:545 file:222 dir:232
  359. umask:546 file:220 dir:231
  360. umask:547 file:220 dir:230
  361. umask:550 file:226 dir:227
  362. umask:551 file:226 dir:226
  363. umask:552 file:224 dir:225
  364. umask:553 file:224 dir:224
  365. umask:554 file:222 dir:223
  366. umask:555 file:222 dir:222
  367. umask:556 file:220 dir:221
  368. umask:557 file:220 dir:220
  369. umask:560 file:206 dir:217
  370. umask:561 file:206 dir:216
  371. umask:562 file:204 dir:215
  372. umask:563 file:204 dir:214
  373. umask:564 file:202 dir:213
  374. umask:565 file:202 dir:212
  375. umask:566 file:200 dir:211
  376. umask:567 file:200 dir:210
  377. umask:570 file:206 dir:207
  378. umask:571 file:206 dir:206
  379. umask:572 file:204 dir:205
  380. umask:573 file:204 dir:204
  381. umask:574 file:202 dir:203
  382. umask:575 file:202 dir:202
  383. umask:576 file:200 dir:201
  384. umask:577 file:200 dir:200
  385. umask:600 file:066 dir:177
  386. umask:601 file:066 dir:176
  387. umask:602 file:064 dir:175
  388. umask:603 file:064 dir:174
  389. umask:604 file:062 dir:173
  390. umask:605 file:062 dir:172
  391. umask:606 file:060 dir:171
  392. umask:607 file:060 dir:170
  393. umask:610 file:066 dir:167
  394. umask:611 file:066 dir:166
  395. umask:612 file:064 dir:165
  396. umask:613 file:064 dir:164
  397. umask:614 file:062 dir:163
  398. umask:615 file:062 dir:162
  399. umask:616 file:060 dir:161
  400. umask:617 file:060 dir:160
  401. umask:620 file:046 dir:157
  402. umask:621 file:046 dir:156
  403. umask:622 file:044 dir:155
  404. umask:623 file:044 dir:154
  405. umask:624 file:042 dir:153
  406. umask:625 file:042 dir:152
  407. umask:626 file:040 dir:151
  408. umask:627 file:040 dir:150
  409. umask:630 file:046 dir:147
  410. umask:631 file:046 dir:146
  411. umask:632 file:044 dir:145
  412. umask:633 file:044 dir:144
  413. umask:634 file:042 dir:143
  414. umask:635 file:042 dir:142
  415. umask:636 file:040 dir:141
  416. umask:637 file:040 dir:140
  417. umask:640 file:026 dir:137
  418. umask:641 file:026 dir:136
  419. umask:642 file:024 dir:135
  420. umask:643 file:024 dir:134
  421. umask:644 file:022 dir:133
  422. umask:645 file:022 dir:132
  423. umask:646 file:020 dir:131
  424. umask:647 file:020 dir:130
  425. umask:650 file:026 dir:127
  426. umask:651 file:026 dir:126
  427. umask:652 file:024 dir:125
  428. umask:653 file:024 dir:124
  429. umask:654 file:022 dir:123
  430. umask:655 file:022 dir:122
  431. umask:656 file:020 dir:121
  432. umask:657 file:020 dir:120
  433. umask:660 file:006 dir:117
  434. umask:661 file:006 dir:116
  435. umask:662 file:004 dir:115
  436. umask:663 file:004 dir:114
  437. umask:664 file:002 dir:113
  438. umask:665 file:002 dir:112
  439. umask:666 file:000 dir:111
  440. umask:667 file:000 dir:110
  441. umask:670 file:006 dir:107
  442. umask:671 file:006 dir:106
  443. umask:672 file:004 dir:105
  444. umask:673 file:004 dir:104
  445. umask:674 file:002 dir:103
  446. umask:675 file:002 dir:102
  447. umask:676 file:000 dir:101
  448. umask:677 file:000 dir:100
  449. umask:700 file:066 dir:077
  450. umask:701 file:066 dir:076
  451. umask:702 file:064 dir:075
  452. umask:703 file:064 dir:074
  453. umask:704 file:062 dir:073
  454. umask:705 file:062 dir:072
  455. umask:706 file:060 dir:071
  456. umask:707 file:060 dir:070
  457. umask:710 file:066 dir:067
  458. umask:711 file:066 dir:066
  459. umask:712 file:064 dir:065
  460. umask:713 file:064 dir:064
  461. umask:714 file:062 dir:063
  462. umask:715 file:062 dir:062
  463. umask:716 file:060 dir:061
  464. umask:717 file:060 dir:060
  465. umask:720 file:046 dir:057
  466. umask:721 file:046 dir:056
  467. umask:722 file:044 dir:055
  468. umask:723 file:044 dir:054
  469. umask:724 file:042 dir:053
  470. umask:725 file:042 dir:052
  471. umask:726 file:040 dir:051
  472. umask:727 file:040 dir:050
  473. umask:730 file:046 dir:047
  474. umask:731 file:046 dir:046
  475. umask:732 file:044 dir:045
  476. umask:733 file:044 dir:044
  477. umask:734 file:042 dir:043
  478. umask:735 file:042 dir:042
  479. umask:736 file:040 dir:041
  480. umask:737 file:040 dir:040
  481. umask:740 file:026 dir:037
  482. umask:741 file:026 dir:036
  483. umask:742 file:024 dir:035
  484. umask:743 file:024 dir:034
  485. umask:744 file:022 dir:033
  486. umask:745 file:022 dir:032
  487. umask:746 file:020 dir:031
  488. umask:747 file:020 dir:030
  489. umask:750 file:026 dir:027
  490. umask:751 file:026 dir:026
  491. umask:752 file:024 dir:025
  492. umask:753 file:024 dir:024
  493. umask:754 file:022 dir:023
  494. umask:755 file:022 dir:022
  495. umask:756 file:020 dir:021
  496. umask:757 file:020 dir:020
  497. umask:760 file:006 dir:017
  498. umask:761 file:006 dir:016
  499. umask:762 file:004 dir:015
  500. umask:763 file:004 dir:014
  501. umask:764 file:002 dir:013
  502. umask:765 file:002 dir:012
  503. umask:766 file:000 dir:011
  504. umask:767 file:000 dir:010
  505. umask:770 file:006 dir:007
  506. umask:771 file:006 dir:006
  507. umask:772 file:004 dir:005
  508. umask:773 file:004 dir:004
  509. umask:774 file:002 dir:003
  510. umask:775 file:002 dir:002
  511. umask:776 file:000 dir:001
  512. umask:777 file:000 dir:000

  

REF:http://oldboy.blog.51cto.com/2561410/1060032

计算Linux权限掩码umask值的更多相关文章

  1. Linux下的权限掩码umask

    权限掩码umask 我们都知道在linux下创建一个文件或者目录之后是可以通过chmod等命令进行权限设置,来达到给当前用户.用户组用户以及其他用户分配不同的访问权限.那么,我们新创建的目录和文件本身 ...

  2. [转]Linux下权限掩码umask

    本文转自:http://www.cnblogs.com/123-/p/4188942.html ---------------------------------------------------- ...

  3. Linux下权限掩码umask

    一 权限掩码umask umask是chmod配套的,总共为4位(gid/uid,属主,组权,其它用户的权限),不过通常用到的是后3个,例如你用chmod 755 file(此时这文件的权限是属主读( ...

  4. 在Linux中设置UMASK值

    umask值用于设置用户在创建文件时的默认权限,当我们在系统中创建目录或文件时,目录或文件所具有的默认权限就是由umask值决定的. 对于root用户,系统默认的umask值是0022:对于普通用户, ...

  5. linux权限掩码

    我的博客:www.while0.com 主要是在新建文件或目录的时候,控制新文件或目录的默认权限. 文件:新建文件默认没有x权限,故新建文件在umask为000时最大权限是666. 目录:新建目录默认 ...

  6. TOP命令监视系统任务及掩码umask的作用

    top 命令使用方法及參数. top 选择參数 參数: -b  以批量模式执行.但不能接受命令行输入: -c 显示命令行,而不不过命令名. -d N  显示两次刷新时间的间隔,比方 -d 5,表示两次 ...

  7. linux中的umask命令

    转载:http://blog.51cto.com/1123697506/882064 一 权限掩码umask umask是chmod配套的,总共为4位(gid/uid,属主,组权,其它用户的权限),不 ...

  8. linux权限管理-特殊权限

    目录 linux权限管理-特殊权限 一,特殊权限 Linux权限属性chattr概述 linux进程掩码umask linux权限管理-特殊权限 一,特殊权限 1.suid(4000) SetUID( ...

  9. Linux命令之umask

    一 权限掩码umask umask是chmod配套的,总共为4位(gid/uid,属主,组权,其它用户的权限),不过通常用到的是后3个,例如你用chmod 755 file(此时这文件的权限是属主读( ...

随机推荐

  1. windows中vim以及cmder的使用

    虽然有gvim,但是我依然更喜欢控制台(可理解为博主的偏执已经发展到某个阶段). windows自带的控制台很糟糕,尤其是我正在用的win7竟然没有全屏功能.任何一个占领屏幕的图标显然是不可忍受的. ...

  2. Python 3 学习笔记之——键盘输入和读写文件

    1. 键盘输入 Python提供了 input() 内置函数从标准输入读入一行文本,默认的标准输入是键盘.input 可以接收一个 Python 表达式作为输入,并将运算结果返回. str = inp ...

  3. eclipse安装问题

    eclipse安装之前需要安装JDK. 注意:eclipse和JDK需要一致,如都是64位或者都是32位. 不然会报错.

  4. 基于网络的 Red Hat 无人值守安装

    基于网络的 Red Hat 无人值守安装 本文介绍了 PC 平台上的一种快速 Red Hat Linux 安装方案.它具有很高的自动化程度--用户只需手工启动机器并选择从网络启动,就可以完成整个安装过 ...

  5. Spring和SpringMVC配置中父子WebApplicationContext的关系

    一.前言 有这么一个故事:一辆装满石头的板车,一根绳子系着,起初绳子没有拉直,拉绳的人以为很轻,等真的绷直了才发现自己的力气根本不够~人往往喜欢得过且过,但是有些东西真的是绕不过的,所以现在必须努力的 ...

  6. Python 装饰器和抽象类

    #装饰器:对类或者函数进行功能的扩展 ''' #第一步:基本函数 def la(): print('脚踏黄河两岸,手拿机密文件,前面机枪扫射,后面炮火连天') #调用函数 la() la() #第二步 ...

  7. $.ajax()方法参数总结

    url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址.type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和d ...

  8. JavaScript十大经典排序算法

    排序算法说明 (1)排序的定义:对一序列对象根据某个关键字进行排序: 输入:n个数:a1,a2,a3,…,an输出:n个数的排列:a1’,a2’,a3’,…,an’,使得a1’ 再讲的形象点就是排排坐 ...

  9. BZOJ 4777 Usaco2017 Open Switch Grass Kruskal+替罪羊树+权值线段树

    这道题首先可以看出答案一定是一条边,而且答案一定在最小生成树上,那么我们就可以在这个最小生成树上维护他与异色儿子的边最小值,所以我们就可以已通过Kruskal和一棵平衡树来解决,时间复杂度是O(n*l ...

  10. vector 基础2

    size  :返回有效元素个数 max_size  :返回 vector 支持的最大元素个数 resize  :改变有效元素的个数 capacity  :返回当前可使用的最大元素内存块数(即存储容量) ...