search points attachment profile arrow left arrow right star heart verified symbols equation arrow-down question mark check menu accountancyadministrationagriculturalalgebraallarabicartart_musicbelarusbelarus_altbiologybusinesscatalachemistrychineseeconomicsegzamenglishentrepreneurshipenvironmentethicseuskarafirst_aidfrenchgalegogeographygeologygeometrygermangrammarhealthhistoryindia_langindonesian_langinformaticsitalianjapanesekazachkazach_altkoreanlanguagelatinlawlife_scienceliteraturelogicmathematicsmusicnigerian_langother_languagesotherspedagogicsphilosophyphysical_educationphysicspoliticspsychologyreligionrpa_langrussianrussian_altsciencesecurityskillssocial_sciencesociologyspanishstatisticstechnologytourismtrafficukrainianukrainian_altukrainian_literaturewos_civilisation accountancyadministrationagriculturalalgebraall_1arabicartart_music_2belarusbelarus_altbiologybusiness_2catalachemistry_1chineseeconomicsexam_3englishentrepreneurshipenvironment_2ethicseuskarasecurity_1frenchgalegogeography_4geology_4geometrygermangrammarhealthhistoryindia-langindonesian-langinformaticsitalianjapanesekazachAsset 230koreanlanguagelatinlawlife-scienceliteraturelogic_2mathematicsmusicnigerian-langotherlanguagesother_1pedagogicsphilosophyphysical_educationphysicspoliticspsychologyreligion_1rpa-langrussianrussian_altsciencesecurity_3_mskills_1allsocial_science_5_msociologyspanishstatisticstechnologytourismtrafficukrainianukrainian_altukrainian_literaturewos_civilisation
Автор - poku19

Два задания на Линукс. Помогите пожалуйста

1. Create empty file and check the access time using ls command with proper option. Update the access time to the current time. Update access time to the beginning of the day.

2. Create empty file testFile and directory testDir. Try to remove both file and directory with one command. Make sure that there will be error when directory will be removed and that removal of the file will result in text output. Redirect successful deletion message to one file and error message to another file. Repeat this actions but redirect both stdout and stderr channels to the same file.

Ответ

Автор - savap0

Ответ:

A)

1) touch emptyfile

2) ls -g

3) cat emptyfile

4) touch -a -m -t 203710141103.24 emptyfile

B)

1) touch testFile

2) mkdir testDir

3) rm ./* 1> ./stdout.txt 2>./stderr.txt

4) rm ./* &> ./stdouterr.txt

Ответы и объяснения

По всем вопросам пишите на - vashurokk@rambler.ru
Сайт znanija.net не имеет отношения к другим сайтам и не является официальным сайтом компании.