Y a pas longtemps j'avais posté ici un truc trouvé sur internet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| #ifndef _LINUX_LIMITS_H
#define _LINUX_LIMITS_H
#define NR_OPEN 1024
#define NGROUPS_MAX 65536 /* supplemental group IDs are available */
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */
#define LINK_MAX 127 /* # links a file may have */
#define MAX_CANON 255 /* size of the canonical input queue */
#define MAX_INPUT 255 /* size of the type-ahead buffer */
#define NAME_MAX 255 /* # chars in a file name */
#define PATH_MAX 4096 /* # chars in a path name including nul */
#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */
#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
#define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */
#define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */
#define RTSIG_MAX 32
#endif |
Je ne sais pas ce que ça vaut. Je teste donc la ligne
#define PATH_MAX 4096 /* # chars in a path name including nul */
fichier limits.bash executable:
1 2 3 4 5 6 7 8 9 10 11 12 13
| #!/bin/bash
pointDeDepart=/home/florian/Documents/MondeMathematiques
rajout=/../../../../home/florian/Documents/MondeMathematiques
cobaye=$pointDeDepart
while ls $cobaye >/dev/null
do
cobaye=$cobaye$rajout
grep -o $rajout <<< $cobaye |grep -c ^
done |
ls dans un script? Non mais N_bah est en weekend....
Et la sortie:
limits.bash &> resultat.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
ls: impossible d'accéder à /home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques/../../../../home/florian/Documents/MondeMathematiques: Nom de fichier trop long |
Nom de fichier trop long. Et alors?
1 2
| echo $((54*76+42))
4146 |
La limite de 4096 semble respectée chez moi
Partager