linux,bash,shell,ls
I am a beginner in bash scripting and I am trying to write a script which has as variables directory names, and who uses those variable values to run simple bash commands such as "ls" and "cd". It works perfectly fine when the directory has a "normal" name, for example...

bash,ls
I'm using a python script I wrote to take some standard input from ls and load the data in the files described by that path. It looks something like this: ls -d /path/to/files/* | python read_files.py The files have a certain name structure based on what data they have in...

bash,multiple-columns,ls
When you call ls without additional options on the command line, you get multiple entries per line. Contrived example: $ ls mydir/*.tar.gz mydir/foo.tar.gz mydir/bar.tar.gz mydir/baz.tar.gz But if you want to modify the output in some way, you get one entry per line: $ ls mydir/*.tar.gz | sed "s/\.tar\.gz//g" mydir/foo mydir/bar...

linux,bash,shell,sh,ls
I was working my way through a primer on Shell (Bash) Scripting and had the following doubt : I came across the ls command The man page of ls lists a few use cases as : ls -a ls --block-size='M' My Question : What is the difference in - and...

linux,terminal,tree,ls
I've been having a peculiar issue caused by the tree command on Linux. When I call tree, the the color of the command prompt changes, and is only returned to normal by the ls command. I'm curious if others have encountered the same issue, and if they have fixes or...

php,unix,web,ls,access-rights
I have looked but it seems I did not found any question like mine. I would like to know what does mean the @ (at sign) on UNIX repository like as follow: MacBook-de-Blouz:twentyfifteen ratinahirana$ ll total 1136 [email protected] 1 ratinahirana staff 376628 28 oct 2014 screenshot.png [email protected] 1 ratinahirana staff...

c,linux,ls
I have for homework to write a C program, which is acting like the Linux "ls -al" command. I know that there are a lot of example programs over the internet, which are doing the thing that I need, but I have a specific problem, to which I can't find...

mysql,linux,ls,gunzip
I want to import the backup database file in *.sql.gz to my backup server. I try to use the follow command but there is an error with it ls -Art *.sql.gz | tail -n 1 | gunzip -c | mysql --user=user --password=password database gzip: stdin: not in gzip format So...

bash,file,numbers,find,ls
I have a directory with these files: 1.html 22.html 333.html zxc.html I want to get a list of the html files that only have digits in their name: 1.html 22.html 333.html I thought this would work find . -regex '^[0-9]+\.html' or ls -al | grep -E '^[0-9]+\.html$' But I get...

linux,bash,sorting,ls,pair
I need to sort a filename pair sorted by time. Every file starts with AUSZUG or UMSATZ (and some numbers after). But the problem is that I cannot sort it by just time because some files can be uploaded (created) not as pair. For example, default sort: ls -ltr --time-style...

linux,acl,ls
I am trying to: List all the subdirectories under a top level directory (/shared) and output this to a file called directory_list Afterwards I want to run getfacl using the file as input, and output the results to a file called acl_list So ultimately, getting the ACLs for all subdirectories...

linux,ls
Suppose I am standing on a directory. Inside there's another directory called inside_dir containing a huge number of files. I want to create a file containing a list of all the files inside inside_dir, listed as the relative path to the files. That is, if there is a file called...

linux,bash,ls
I want to read all the files in a particular directory, and I want to read it one by one. Here's what i've done so far. ls successfully get all the files from a specified directory, but could not give the file names to me one by one. It Echos...

c,unix,ls
When I run ls -l /dev on OS X I get an output with the following format (but many more files): crw-rw-rw- 1 root wheel 4, 126 Jun 11 20:28 ttywe crw-rw-rw- 1 root wheel 4, 127 Jun 11 20:28 ttywf As far as I can tell, it is specific...

c,file,recursion,structure,ls
The goal of this program is to take a command line argument of a directory, and print the top 10 largest files under that directory (including subdirectories). So far, I am just trying to get it to print the files and their sizes recursively. I am using a structure to...

linux,unix,path,ls,pwd
i'm using ls myfolder and I've seen ls -lrt -d -1 $PWD/* which lists files with full path the question is how do i list files with full path in a folder? (without using cd to go inside that folder)...

unix,ls
I know I can use: for file in *.csv; do echo $file; done to list all the files the current directory with the supplied suffix. I also know I can use: ls -rt to list all the files in order of when they were modified with the most-recently-modified at the...

wildcard,ls
Is there a command which lists all folders that matches a wildcard expression? Example, if there are thousands of directories and I only want those ending in M or those starting in JO to be listed, can I do that with a certain Linux command? Thanks!

regex,bash,foreach,tcl,ls
If I have a folder with the following files: hello-version-1-090.txt hello-awesome-well-091.txt goodday-087.txt hellooo-874.txt hello_476.txt hello_094.txt How can I search for a file which has the term: 'hello' and '091' in it using tcl. Possible solution: taking the output of an ls -l in a folder, splitting it with '\n' and...

c,linux,unix,ls,bin
I need to know what's the address from which /bin/ls program execution starts (after dynamic linker fix the environment, what address gets the control?) I need it in hexadecimal (0xNNN...) or decimal format

unix,grep,ls
I have a set of files in a directory named abc data.txthellohello1hello1.texthello.txt I want to list only the files hello and hello1. I tried using this command ls -lrt hello* | ls -lrt !(hello*.*) The output which I got is abcdata.txthellohello1 The pipe function is not working in this scenario....

linux,shell,ls
I have a newbie question regarding linux command ls. How can I only show the filename(without the full path), the size of the file and the date? for example I want to show somehting like this: somehting.jpg 4096 04/05/2015 ...

r,vector,ls,cbind
I have 100 numeric vectors named sim1 to sim100 in my workspace, all of the same length (18). I'm trying to find a way to identify them and cbind them to create a data frame of 18 rows and 100 columns. I can easily create a character vector of length...

osx,ls,oh-my-zsh
I recently configured my terminal according to this blog. After followed it step by step, everything is OK but the colour of ls's outputs are grey. I googled this problem and found this. It says that adding export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD to the .bash_profile will resolve this problem. BUT, I use zsh...