ls

How to know the exact location where the file is being accessed in Android NDK

a 夏天 提交于 2020-01-16 19:07:27
问题 With "lsof" i can check the list of open files is there any command or any other way by which i can detect where the files the files are being accessed. The output of "lsof" command is as follows:- COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 ??? cwd ??? ??? ??? ??? /proc/1/cwd (readlink: Permission denied) init 1 ??? exe ??? ??? ??? ??? /proc/1/exe (readlink: Permission denied) init 1 ??? root ??? ??? ??? ??? /proc/1/root (readlink: Permission denied) init 1 ??? FDS /proc/1/fd/

save the result of ls command in the remote sftp server on local machine

孤者浪人 提交于 2020-01-16 01:07:12
问题 I have seen This question but I am not satisfied with answer. I connect to remote sftp server and I will do ls there I want to have the result of ls on my local machine. I don't want any thing extra to be saved, only the result of ls command. Can I save the result to a variable accessible on the local machine? #!/usr/bin/expect spawn sftp myuser@myftp.mydomain.com expect "password:" send "mypassword\n"; expect "sftp>" send "ls\n" //save here interact 回答1: Here's how I would do it, with a more

Assign file names to a variable in shell

给你一囗甜甜゛ 提交于 2020-01-14 22:54:23
问题 I'm trying to write a script that does something a bit more sophisticated than what I'm going to show you, but I know that the problem is in this part. I want each name of a list of files in a directory to be assigned to a variable (the same variable, one at a time) through a for loop, then do something inside of the loop with this, see what mean: for thing in $(ls $1); do file $thing; done Edit: let's say this scrypt is called Scrypt and I have a folder named Folder, and it has 3 files

Using grep and ls in FTP client?

不羁岁月 提交于 2020-01-13 13:04:42
问题 How could I use grep and ls in FTP client... I mean if I want to find some specific file I could use: ls -l | grep pattern 回答1: lftp can, exactly the way you typed. 回答2: With the usual Unix commandline interactive ftp, one approach is: Remote system type is UNIX. Using binary mode to transfer files. ftp> dir . foobar output to local-file: foobar [anpqy?]? y 500 Unknown command 227 Entering Passive Mode (62,149,140,15,195,159) 150 Accepted data connection 11966 5.26 KB/s 226-Options: -a -l 226

How to merge files in bash in alphabetical order

允我心安 提交于 2020-01-12 05:23:07
问题 I need to merge a bunch of mp3 files together. I know that simply doing cat file1.mp3 >> file2.mp3 seems to work fine (at least it plays back correctly on my Zune anyway). I'd like to run cat *.mp3 > merged.mp3 but since there are around 50 separate mp3 files I don't want to be surprised halfway through by a file in the wrong spot (this is an audio book that I don't feel like re-ripping). I read through the cat man pages and couldn't find if the order of the wildcard operator is defined. If

Maximum number of inodes in a directory? [closed]

余生长醉 提交于 2020-01-11 17:15:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Is there a maximum number of inodes in a single directory? I have a directory of over 2 million files and can't get the ls command to work against that directory. So now I'm wondering if I've exceeded a limit on inodes in Linux. Is there a limit before a 2^64 numerical limit? 回答1: df -i should tell you the

No such file or directory when 'cp' but not with 'ls'

…衆ロ難τιáo~ 提交于 2020-01-07 16:59:04
问题 I am trying to copy the shared preferences folder of my app to the /sdcard partition from my PC using the following ADB command: adb shell su -c "cp /data/data/com.anrapps.pixelbatterysaver/shared_prefs/ /sdcard/appdata/" But this returns cp: Skipped dir '/data/data/com.anrapps.pixelbatterysaver/shared_prefs': No such file or directory . However when executing the ls command, it says that folder is present: adb shell su -c "ls /data/data/com.anrapps.pixelbatterysaver" cache code_cache files

No such file or directory when 'cp' but not with 'ls'

≯℡__Kan透↙ 提交于 2020-01-07 16:58:11
问题 I am trying to copy the shared preferences folder of my app to the /sdcard partition from my PC using the following ADB command: adb shell su -c "cp /data/data/com.anrapps.pixelbatterysaver/shared_prefs/ /sdcard/appdata/" But this returns cp: Skipped dir '/data/data/com.anrapps.pixelbatterysaver/shared_prefs': No such file or directory . However when executing the ls command, it says that folder is present: adb shell su -c "ls /data/data/com.anrapps.pixelbatterysaver" cache code_cache files

No such file or directory when 'cp' but not with 'ls'

痞子三分冷 提交于 2020-01-07 16:58:06
问题 I am trying to copy the shared preferences folder of my app to the /sdcard partition from my PC using the following ADB command: adb shell su -c "cp /data/data/com.anrapps.pixelbatterysaver/shared_prefs/ /sdcard/appdata/" But this returns cp: Skipped dir '/data/data/com.anrapps.pixelbatterysaver/shared_prefs': No such file or directory . However when executing the ls command, it says that folder is present: adb shell su -c "ls /data/data/com.anrapps.pixelbatterysaver" cache code_cache files

No such file or directory when 'cp' but not with 'ls'

混江龙づ霸主 提交于 2020-01-07 16:57:27
问题 I am trying to copy the shared preferences folder of my app to the /sdcard partition from my PC using the following ADB command: adb shell su -c "cp /data/data/com.anrapps.pixelbatterysaver/shared_prefs/ /sdcard/appdata/" But this returns cp: Skipped dir '/data/data/com.anrapps.pixelbatterysaver/shared_prefs': No such file or directory . However when executing the ls command, it says that folder is present: adb shell su -c "ls /data/data/com.anrapps.pixelbatterysaver" cache code_cache files