directory

安装软件:/lib/ld-linux.so.2: bad ELF interpreter解决

有些话、适合烂在心里 提交于 2020-01-02 15:22:43
http://linux.chinaitlab.com/set/928509.html 我们在CentOS系统中安装软件:/lib/ld- linux .so.2: bad ELF interpreter的解决办法! 环境: [orangle@localhost Downloads]$ uname -m&&uname -r x86_64 2.6.32-220.el6.x86_64 [orangle@localhost Downloads]$ cat /etc/redhat-release CentOS release 6.2 (Final) **************************************************************************************** 使用的时候出现一个错误 bash: /usr/local/bin/rar: /lib/ld- linux .so.2: bad ELF interpreter: No such file or directory 是因为64位系统中安装了32位程序 解决方法: yum install glibc.i686 重新安装以后还有如下类系错误 再继续安装包 error while loading shared libraries: libstdc++.so.6: cannot

How to detect ftp file name is a directory?

扶醉桌前 提交于 2020-01-02 09:52:33
问题 In Java I'm trying to delete a ftp directory. But if it's not empty, I need to delete all files and sub-dirs in it, by calling files[]=ftp.dir() . I can get a list from the dir, but how can I tell if one of the items in the list is a file or sub-dir ? Is there a files[i].IsDirectory method in ftp command? 回答1: I would use apache FTP Client for this. In that library there is a method called listFiles() that returns an array of FTPFile. For each FTPFile you can call the getType() method to

create batch file to copy folder contents with dynamic name

对着背影说爱祢 提交于 2020-01-02 08:55:09
问题 I am absolutely brand new to any kind of development but need a batch job to copy a file from one folder to another. The problem is that the source folder is dynamically named. The folder name will contain the current date and a suffix number (eg. "TestRun_20141106_13") - so I will never be able to determine the 'latest' version of the folder before running the batch / copy job. Can anyone help please? I know this will be easy for someone but as I said, I am a complete noob!! Thanks in

delphi - calculate directory size API?

佐手、 提交于 2020-01-02 07:14:28
问题 Anyone knows other way to get a directoy's size, than calculate it's size by counting file with file? I'm interested on some win32 API function. I've google it about this, but i didn't found relevant information so i'm asking here. PS: I know how to calculate a directory size by using findfirst and findnext and sum all file's size. 回答1: Getting the size of one directory is a pretty big problem, mostly because it's something you can't define. Examples of problems: Some filesystems, including

delphi - calculate directory size API?

最后都变了- 提交于 2020-01-02 07:13:03
问题 Anyone knows other way to get a directoy's size, than calculate it's size by counting file with file? I'm interested on some win32 API function. I've google it about this, but i didn't found relevant information so i'm asking here. PS: I know how to calculate a directory size by using findfirst and findnext and sum all file's size. 回答1: Getting the size of one directory is a pretty big problem, mostly because it's something you can't define. Examples of problems: Some filesystems, including

Python: Import file in grandparent directory

北城以北 提交于 2020-01-02 03:40:12
问题 Hierarchy: scripts/ web/ script1.py tests/ script2.py common/ utils.py How would I import utils in script1 and script2, and still be able to run those scripts seperately (i.e., python script1.py ). Where would I place the __init__.py files, and is that the correct way to go about this? Thank you! 回答1: package/ __init__.py scripts/ web/ __init__.py script1.py tests/ __init__.py script2.py common/ __init__.py utils.py I've added a bunch of empty __init__.py files to your package. Now you have 2

Best/Easiest/Quickest way to get relative path between two files?

做~自己de王妃 提交于 2020-01-01 16:12:29
问题 I'm in the midst of some refactoring some C# code and part of this is to redo some references, because we're redoing the folder structure entirely. What I'd like to do is just go into the .csproj or .sln file and modify the paths. However some of the references have paths like "../../../../../../ThirdParty/SomeMicrosoftLibrary/bin/Debug/SomeMicrosoftLibrary.dll And since we've moved everything around I need to find the new relative path. But I absolutely hate trying to do this (figure out how

Best/Easiest/Quickest way to get relative path between two files?

北慕城南 提交于 2020-01-01 16:12:09
问题 I'm in the midst of some refactoring some C# code and part of this is to redo some references, because we're redoing the folder structure entirely. What I'd like to do is just go into the .csproj or .sln file and modify the paths. However some of the references have paths like "../../../../../../ThirdParty/SomeMicrosoftLibrary/bin/Debug/SomeMicrosoftLibrary.dll And since we've moved everything around I need to find the new relative path. But I absolutely hate trying to do this (figure out how

如何用wget指定位置?

丶灬走出姿态 提交于 2020-01-01 14:33:01
我需要将文件下载到/ tmp / cron_test /。 我的 wget 代码是 wget --random-wait -r -p -nd -e robots=off -A".pdf" -U mozilla http://math.stanford.edu/undergrad/ 那么是否有一些参数来指定目录? #1楼 从手册页: -P prefix --directory-prefix=prefix Set directory prefix to prefix. The directory prefix is the directory where all other files and sub-directories will be saved to, i.e. the top of the retrieval tree. The default is . (the current directory). 因此,您需要在命令中添加 -P /tmp/cron_test/ (简短格式)或 --directory-prefix=/tmp/cron_test/ (长格式)。 另请注意,如果目录不存在,则会创建该目录。 #2楼 试试这个方法 - import os path = raw_input("enter the url:") fold = raw_input("enter the

Is there a way to detect changes in a folder using php on both windows and linux?

荒凉一梦 提交于 2020-01-01 12:15:13
问题 I'm looking for a solution to detect changes in folder(s) using php . The application may run on both platforms( linux and windows ). I may use different methods for each platform as long as results are the same. What I desire is : If a file/folder is added to a directory, I want my app to detect this new file and read its attributes ( size,filetime etc) If a existing file/folder is saved/contents changed/deleted, I need to detect this file is changed It would be better if I can monitor a