我已经下载了64位可执行的崇高文本文件,并提取了它。然后它创建了一个名为Sublime 2的子目录,我可以看到,因为我已经做了一个ls。
问题是,当我做cd Sublime Text 2时,我得到:
-bash: cd: Sublime: No such file or directory.
你能告诉我我做错了什么吗?我是Linux的新手!
我是Linux新手。我正在尝试创建一个脚本来打印某些内容并启动一个关机命令。这是我的剧本:
#!/bin/bash
echo Hello WOOOOORRRRRLLLLDDDDDDD
echo sudo poweroff
每次我试图运行我的脚本,使用
chmod +x Hello World BASH
或者。/你好,世界巴什
但是,我收到以下错误消息:
chmod: cannot access 'Hello': No such file or directory
chmod: cannot access 'World': No such file o
# ldd /usr/bin/ffmpeg
linux-vdso.so.1 => (0x00007ffffc1fe000)
libavfilter.so.0 => not found
libpostproc.so.51 => not found
libswscale.so.0 => not found
libavdevice.so.52 => not found
libavformat.so.52 => not found
libavcodec.so.52 => not found
li
我正在Linux上工作,有一个文件夹,它包含许多子目录。我需要删除所有的子目录有一个相同的名字。例如,
dir
|---subdir1
|---subdir2
| |-----subdir1
|---file
我想删除所有的subdir1。这是我的剧本:
find dir -type d -name "subdir1" | while read directory ; do
rm -rf $directory
done
然而,我执行它,但似乎什么都没有发生。
我也尝试过find dir -type d "subdir1" -delete,
我想使用linux脚本读取文件的内容。file_list.txt的内容如下:
abc
def
ghi
读它的脚本是read_file_content.sh
#!/bin/bash
for file in $(cat file_list.txt)
do
"processing "$file
done
当我以./read_file_content.sh的形式运行命令时,我会得到以下错误:
./read_file_content.sh: line 6: processing abc: command not found
./read_file_content.sh: line 6
我想用shell脚本打印一个文件夹的结构。所以它看起来就像这样
File : linux -3.14/COPYING
File : linux -3.14/CREDITS
Directory : linux -3.14/Documentation
File : linux -3.14/Documentation/00 - INDEX
Directory : linux -3.14/Documentation/ABI
File : linux -3.14/Documentation/ABI/README
这是我的脚本。问题是它会打印出当前目录的所有
我试图编译内核模块源代码,直到我注意到一些空格会导致路径名称不匹配。我发现自己的目录是:
axor@vacuum:~/software/CS 8803/Operating System Concepts/Chapter 2/ch2$ ls
Makefile simple.c
我所犯的错误:
axor@vacuum:~/software/CS 8803/Operating System Concepts/Chapter 2/ch2$ make
make -C /lib/modules/4.9.0-3-amd64/build M="/home/none/software/CS 8803/
我知道在文件名周围添加空格在技术上是一个错误,但我只想知道为什么下面的代码在Windows上返回true,而在Linux上返回false:
public static void main(String[] args) {
File file = new File("some_file_that_exists "); // note the whitespace at the end
System.out.println(file.exists());
}
我在jdk1.6.0_31中使用Windows764位,在Linux2.6.18上用jdk1.6.0_06
我有一个python脚本,它处理Linux目录中的文件。代码的一部分如下所示:
path_to_dir = "/home/user/Im a folder with libs to install/"
if os.path.isdir(path_to_dir):
print "it can locate the directory"
os.chdir(path_to_dir) # everything ok here :D
subprocess.call(['./configure'], shell = True)