General :: I /O Error When Trying To List Files In Directory
Dec 28, 2010When I try to list files in directory. I am getting i/o error
#ls -l /test
I am getting i/o error. Why I am getting this error and what are these i/o errors.
When I try to list files in directory. I am getting i/o error
#ls -l /test
I am getting i/o error. Why I am getting this error and what are these i/o errors.
I'm trying to write a bash script that gets the list of files in a directory and puts them into a variable, then checks each entry and outputs them as follows:
item1 is a FILE
item2 is a DIR
item3 is a DIR
etc etc.
I am able to get the list of files into a variable, but unsure how to get the output I want.
When I run "ls -al somedir*" (I use the "ll" shortcut, actually), Linux not only list files that match, but also the contents of directories whose name also happens to match.Is there a way to limit "ls" so that it will only show names (files and directories) and ignore the contents of the directories?
View 2 Replies View RelatedI have uShare 1.1a setup to talk to my XBox 360. If I share a directory that has no subdirectories, the video files display on the XBox. However, most of my files are in sub-directories on a different partition - I don't really want to copy them to the share, but uShare doesn't seem to recognise any sub-directories or files contained therein.
I have tried setting up symbolic soft links directly to the video files (although this is a pain, it is better than moving the files)...
Code:
ln -s /home/jonftp/TV-Shows/Buffy/Season-1/Buffy-101.avi /home/share/Buffy-101.avi
...but these don't show up on the XBox either.
How can I get uShare to "drill down" the directory structure to list the files or how can I get uShare to follow symbolic links?
I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.
find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;
How can we list only files present in a directory in Redhat linux.The LS commands lists both the files and the directories. What command can be used for the above purpose.
View 1 Replies View RelatedHow to list only hidden files in current directory ?
View 2 Replies View RelatedWorking fine: ==> scp my_log-bin.01393[0-9] root@192.168.103.66:/backup/ error - No such file or directory: ==> scp my_log-bin.0139[30-99] root@192.168.103.66:/backup/
View 4 Replies View Relatedi have ubuntu karmic 9.10 and when i try to update anything or install anything the a very similar error occurs."(Reading database . . . 55%dpkg: unrecoverable fatal error , aborting: files list file for package `com.palm.net.precoddr.fcoaster' contains empty filenameit repeats this message 3 times then gives up i believe.
View 9 Replies View RelatedWhen i try installing anything i get errors, for example when i try to install somthing from ubuntu software center i get this.
Code: installArchives() failed: Preconfiguring packages ... Preconfiguring packages ... Selecting previously deselected package ttf-symbol-replacement. (Reading database ... dpkg: warning: files list file for package `libsdl-image1.2' missing, assuming package has no files currently installed.
[Code]....
I need a sed command to print a list of files in "/home" directory, ending in ".sh"
View 4 Replies View Related1 List the contents of directory, /dev using a detail listing format and page by page.
2Mount the CDROM to the directory, /media/cdrom.
3 Delete the file "/home/student/myfile" without any confirmation (Assume you have the required file permission to delete this file).
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies View RelatedHow do you perform a long directory listing of all files in the /bin directory that have exactly three characters in their name?
View 1 Replies View RelatedIs there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
View 2 Replies View RelatedI want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | [filename] | mail -s "This is just a test" [email address]
I would rather not write a bash script. Is there an easier way to do this? I was looking into some commands like find and grep.
I'm quite new to linux but I have configured a simple ftp server and it's working great. I have a FTP-Shared folder with upload and download subfolders. Under upload's and download's I have identical category subfolders like mp3's, movies, software etc. in both. As the guy's upload, I would like to create a line crontab where I can move all the content under /FTP-Shared/upload/mp3/* older than 14 day's to FTP-Shared/downloads/mp3/ recursively (Like in cp command), but the timestamp must be searched on the first directory and not sub files example: /mp3/Club Dance/CD1/Hallo world.mp3This is how far I got:[root@clients ~]# /usr/bin/find /FTP_Shared/upload/Mp3s/ -depth -mindepth 1 -mtime +14 -type d -exec mv -f {} /FTP_Shared/download/Mp3s/ ;This command moves the directory and files, but it is not recursively
View 4 Replies View RelatedWhat I'm trying to do: write a script that will list all the directories in a given location. Ask the user to enter a number corresponding to the location of the directory in the list, and then moving into that directory.
I have written a script to do this, but it only works when I run it as: <user>$program_name and the script runs in a sub-shell. But, when it is run in a sub-shell, the changes made by the script go away after the script ends.
When I run it as:
<user>$. program_name
and the script runs in the current source shell, I get an error:
bash: cd: /home/dev/Project/dirname: No such file of directory
Code:
IFS='
' read -d '' -a ArrName < <(ls ~/Projects)
read filenumber
cd $HOME/Projects/${ArrName[$filenumber]}
I am a student studying computer science course.
Well, I am facing problem when doing lab questions.
I must use DLXLinux bundled in Bochs (bochs.sourceforge.net).
I am required to use the /usr/local directory.
In /usr directory, there is no directory named 'local' but there is one thing called 'local@'. So, when I try to use mkdir command to create 'local' directory in /usr , there are error "cannot make directory.....".
Look at my screenshot at [url].
I'm sure I've done this before and am having a brain fart.
I have run into this a couple of time this last month:
I have a list of torrent files (blahblahhexblah.torrent) saved in a text file. I would like to read the text file and populate the client directory.
I can echo the file using:
But I cannot remember how to pipe the output into the directory, nor can I find any resources that describe the process.
Interestingly enough, I've had a couple of opportunities to do similar tasks with passwords and privileges and even across the LAN in the last few days. Solving this problem will help me solve the others for next time.
Whenever I try to install or remove a program, I get the following error
Code:
dpkg: warning: files list file for package `libavahi-common-data' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `libgtk2.0-common' missing, assuming package has no files currently installed.
dpkg: warning: files list file for package `libxres1' missing, assuming package has no files currently installed. (Reading database ... 55%dpkg: unrecoverable fatal error, aborting: files list file for package 'ubuntu-mono' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)
If I have a directory /foo with a few files in it, how do I symlink each entry in /foo into /bar/? For instance, if /foo has the files a, b and c, I want to create three symlinks:
/bar/a -> /foo/a
/bar/b -> /foo/b
/bar/c -> /foo/c
I have recently taken delivery of a Dell Inspiron mini netbook with Ubuntu on, and I am new-fangled .install updates, I clicked the (orange down-arrow) button, and it compalined "E: /var/cache/apt/archives/linux-image-2.6.24-22-lpia_2.6.24-22.45netbook9_lpia.deb: files list file for package `libxcb-shape0' is missing final newline"
View 2 Replies View RelatedI am trying to get this script to work. The purpose is to download a list of modules from the slax.org the list consist of a list of module numbers. What I am trying to do is Download the file or the file name corresponding to the number in the list.the list is comma delimited. this is what I have done so far and I am a stand still.
#!/bin/sh
# Wget script to retrieve modules from slax.org modules
#
# ----Begin of user defined values -----
# Path to wget
[code].....
I have some files located in /vol0/archives that has several files Eg:- arch_00001.arc , arch_00002.arc, arch_00003.arcI want to tar each of those files into separate tar ball by taking it garbing it file name sequence,Eg:- arch_00001.arc.tar.gz , arch_00002.arc.tar.gz, arch_00003.arc tar.gzhow do I define the tar command to go get those files and tar each file separately, As I mention above
View 2 Replies View RelatedHow would i go about copying files to a directory, yet skip the files that already exist in the directory, and also remove the files that are in the directory. For example:
Code:
$ls /dir1
img001.jpg
img002.jpg
[code]....
Now i would like to copy from dir1 to dir2, but the contents of dir2 would be:
Code:
$ls /dir2
img003.jpg
don't know much, but when I tried to update I get this error:
E: Type 'sudo' is not known on line 52 in source list /etc/apt/sources.list E: The list of sources could not be read.
How can I list (using ls) all files that are not empty (size > 0) using linux?
View 7 Replies View Relateduntar a bunch of files located in different folders, with folder deep unkown.Found an old post about this matter but the suggestion extracts all files in the same folder (your current).I wan't to extract files to the same folder as the tar file.The solution from the old post (extracts all files to current folder)find . -name "*.tar" -exec tar xvf {}
View 1 Replies View RelatedHow do I (in the command line) list all the .txt (or any common attribute) files in a directory?
View 4 Replies View Related