以下操作能实现追加写入文件的是
A: echo "hello" > /tmp/test
B: echo "hello" >> /tmp/test
C: print "hello\n" >> /tmp/test
D: printf "hello\n" >> /tmp/test
A: echo "hello" > /tmp/test
B: echo "hello" >> /tmp/test
C: print "hello\n" >> /tmp/test
D: printf "hello\n" >> /tmp/test
B,D
举一反三
- 以下操作能实现追加写入文件的是 A: echo "hello" > /tmp/test B: echo "hello" >> /tmp/test C: print "hello " >> /tmp/test D: printf "hello " >> /tmp/test
- 如何删除一个非空子目录/tmp/test A: del /tmp/test B: rmdir /tmp/test C: rm -rf /tmp/test D: mkdir /tmp/test
- 在linux系统中,删除/tmp/test目录及其子目录,并且不用确认,以下正确的命令是()。 A: rm-rf/tmp/test B: rmdir/tmp/test C: rm-r/tmp/test D: rm-r-f/tmp/test E: rm-f/tmp/test
- 判断一个文件/mnt/cdrom存在且为目录的命令是( )。 A: test -d /tmp/cdrom B: test -f /tmp/cdrom C: test -r /tmp/cdrom D: test -w /tmp/cdrom
- 以下哪个JSON格式是正确的: A: {"test":"hello"} B: ["test":"hello"] C: {"test":"hello":"world"} D: {"test"}
内容
- 0
以下程序的输出结果是:( )fo = open("text.txt",'w+')x,y ='this is a test','hello'fo.write('{}+{}\n'.format(x,y))print(fo.read())fo.close() A: this is a test hello B: this is a test C: this is a test,hello. D: this is a test+hello
- 1
在/tmp目录下新建一个名为test目录;进入/tmp/test目录;将/etc/man.config复制到/tmp/test目录下;
- 2
当前目录是~,在/tmp目录建立test子目录,可用的命令是( ) A: mkdir /tmp/test B: mkdir test C: mkdir /test D: mkdir ./test
- 3
① 以root登入系统,并且进入/tmp当中;② touch test,并且更改test权限成为777;③ 以—般使用者登入,并进入/tmp;④尝试删除test这个文件。写出命令及执行结果。
- 4
下面的程序执行后,文件test中的内容是()。voidfun(char*fnam...n("test","hello,");}