Jump to content
em

[linux] Replica urmatorul ecran

Recommended Posts

În urma rul?rii comenzii ls -l primesc urm?torul output


total 36
drw-r--r-T 2 root admins 4096 2009-12-12 10:10 dir1
-rwxr--r-x 2 rst hackers 9845 2010-12-03 04:03 fis1
-rwxr--r-- 1 hy hackers 5000 2011-13-03 04:06 fis2
-rwxr--r-x 2 ccsir hackers 9845 2012-14-03 04:03 link
lrwxrwxrwx 1 rst hackers 4 2006-15-09 04:13 linked -> fis1

Cum a?i face s? primi?i acela?i output. Vreau *toate* comenzile.

Premiu, domeniu. Fara posturi editate. :)

Link to comment
Share on other sites



mkdir dir1
chown root:admins dir1
chmod 1644 dir 1
touch -d "2009-12-12 10:10"
ln dir1 .dir1-link

dd if=/dev/urandom of=./fis1 bs=9845 count=1
chown rst:hackers fis1
chmod 745 fis1
touch -d "2010-12-03 04:03" fis1
ln fis1 .fis1-link

dd if=/dev/urandom of=./fis2 bs=5000 count=1
chown hy:hackers fis2
chmod 744 fis2
touch -d "2011-13-03 04:06" fis2

cp fis1 link
chown ccsir:hackers link
touch -d "2013-14-03 04:03" link
ln link .link-of-da-madafakin-link

ln -s fis1 linked
chmod 777 linked
touch -d "2006-15-09 04:13" linked

touch .random_file1
touch .random_file2
touch .random_file3
...
touch .random_file27

Edited by sadik
Link to comment
Share on other sites

Nu am terminal. Lucrez de pe un laptop cu Windows 7 care trebuie reinstalat. :))

29 de file (*27 dupa edit) pentru ca tie iti da un total de 36. Care inseamna 7 vizible, 2 link-uri ascunse, fisierul ".",fisierul ".." si inca 27 de file ascunse.

Am editat postul initial ^^^

Link to comment
Share on other sites

~$ echo "total 36

drw-r--r-T 2 root admins 4096 2009-12-12 10:10 dir1

-rwxr--r-x 2 rst hackers 9845 2010-12-03 04:03 fis1

-rwxr--r-- 1 hy hackers 5000 2011-13-03 04:06 fis2

-rwxr--r-x 2 ccsir hackers 9845 2012-14-03 04:03 link

lrwxrwxrwx 1 rst hackers 4 2006-15-09 04:13 linked -> fis1"

total 36

drw-r--r-T 2 root admins 4096 2009-12-12 10:10 dir1

-rwxr--r-x 2 rst hackers 9845 2010-12-03 04:03 fis1

-rwxr--r-- 1 hy hackers 5000 2011-13-03 04:06 fis2

-rwxr--r-x 2 ccsir hackers 9845 2012-14-03 04:03 link

lrwxrwxrwx 1 rst hackers 4 2006-15-09 04:13 linked -> fis1

Fii atent la combinatia asta:

În urma rularii comenzii ls -l primesc urmatorul output
Link to comment
Share on other sites

Simplu. Comanda vdir


bcman-test@stargate:~/proiecte$ vdir
total 28
-rw------- 1 bcman-test bcman-test 59 Oct 17 20:17 asdf.cpp.save
-rwxrwxr-x 1 bcman-test bcman-test 264 Oct 20 19:28 proxy.py
-rw-rw-r-- 1 bcman-test bcman-test 35 Oct 16 18:37 Python-1.py
-rwxrwxr-x 1 bcman-test bcman-test 7611 Oct 16 19:28 test
-rw-rw-r-- 1 bcman-test bcman-test 84 Oct 16 19:26 test.cpp
-rw-rw-r-- 1 bcman-test bcman-test 1728 Oct 16 19:28 test.o

Si exemplu cu symlink:


total 28
-rw------- 1 bcman-test bcman-test 59 Oct 17 20:17 asdf.cpp.save
lrwxrwxrwx 1 root root 4 Oct 30 19:12 b -> test
-rwxrwxr-x 1 bcman-test bcman-test 264 Oct 20 19:28 proxy.py
-rw-rw-r-- 1 bcman-test bcman-test 35 Oct 16 18:37 Python-1.py
-rwxrwxr-x 1 bcman-test bcman-test 7611 Oct 16 19:28 test
-rw-rw-r-- 1 bcman-test bcman-test 84 Oct 16 19:26 test.cpp
-rw-rw-r-- 1 bcman-test bcman-test 1728 Oct 16 19:28 test.o

Edited by bcman
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...