All Issues
24,993 verified issues
How to sort first directories then files etc… when using “ls” in Unix
I would like to use the command to first show directories and then files. I tried: But I got a wrong order.
How can I copy a file in Unix without altering its last modified time?
If I copy some file from some place to another using , the timestamp on the copied file is set to the time of the copy. Is there some way to avoid this? I need to copy files without altering their timestamps.
How to tell from what Ubuntu or Debian repository a package comes?
On a Debian-based system, including Ubuntu, how can one tell which repository a package will be downloaded from, without actually beginning the download? and will show the section (e.g., metapackage, base, graphics), but not the repository to which a package belongs (e.g., http://ppa.launchpad.net/mactel-support/ppa/ubuntu or http://us.archive.ubuntu.com/ubuntu/). When installing the package, the actual repository appears during the download (it is printed out in the "downloading from ..." output from apt and similar programs), but how can one obtain information on the repository containing the package (or a specific version of a package) without downloading and installing it first? Additionally, how can one determine the source repository for a package that is already installed?
Forward SSH traffic through a middle machine
SSH tunneling is very confusing to me. I am wondering if I can do this in Linux. I have 3 machines.. So I can SSH from A -> B and from B -> C, but not from A -> C. Is there a way to setup an SSH tunnel from A through B, so when I run other SSH commands it they just work from my local machine A? I am basically trying to clone a git repo from work to home (and I cannot install git on machine B). Also, once setup.. How would I unset it as well?
Remote desktop without a password
I have an HTPC with a user that has no password and autologin. I want to be able to connect to it via Remote Desktop without a password, so I can login with the original user. (I don't want to add another user just for the mstsc) Is there a way of doing that? The OS is Windows 7, 32bit.
How do I list the SSL/TLS cipher suites a particular website offers?
How can I retrieve a list of the SSL/TLS cipher suites a particular website offers? I've tried openssl, but if you examine the output: it just shows that the cipher suite is something with AES256-SHA. I know I could grep through the hex dump of the conversation, but I was hoping for something a little more elegant. I would prefer to do this on Linux, but Windows (or other) would be fine. This question is motivated by the security testing I do for PCI and general penetration testing. Update: GregS points out below that the SSL server picks from the cipher suites of the client. So it seems I would need to test all cipher suites one at a time. I think I can hack something together, but is there a simpler, more future-proof (e.g. new ciphers) way to do this?
Delete matching files in all subdirectories
How can I remove all .swp files in all of my subdirectories under Linux?
A command-line or batch cmd to concatenate multiple files
I have 50 text files in one directory. Is there a Windows command-line method to concatenate those files into a single file? I am using Windows Vista. I don't want to type the name of all files.
Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip files?
I have a batch file that outputs a text file. I thought it would be nice if I could zip it up too. This will be used in an uncontrolled environment, so I can't make assumptions about the presence of third-party software products such as 7-Zip, etc. This needs to use Windows' now-built-in capability to zip files.
How to disable Ctrl+Shift keyboard layout switch (for the same input language) in Windows?
In Windows (XP at least), when there are two or more keyboard layouts for the same input language, pressing Ctrl+Shift switches the keyboard layout. Where can this be disabled or changed to another keystroke combination? A similar feature is changing input languages. Alt+Shift is the default keystroke and that can be changed and disabled through the Regional and Language Options in the Control Panel. The keyboard layout switch (Ctrl+Shift) cannot be found in that panel.
A DownThemAll equivalent for Chrome
I'm looking for a Chrome extension / add-on that's like DownThemAll in functionality. Basically an add-on that will allow me to bulk download files with the same extension and/or pattern from a web page with a single click. Does anyone know if Chrome now has such extensions?
Less: Quickly Jump to Line Number in Large File
I'm struggling to figure out a way to do this...I'm using to view a large (~1GB) file. I want to jump to line "$n" in the file - preferably without having to wait for lines 1-($n-1) to scroll by in my terminal. I would do this in vim using something like this: Is there an equivalent command line option? If not, is there a way to do this once the file is open in ?
Getting back the old Alt-Tab windows switching behavior in Windows 7
When you run more than six applications on Windows 7 and you press Alt + Tab, icons representing the first six applications and the desktop appear on the first row of the grid and you can cycle with Alt + Tab + Tab... through the six most-recently used windows the usual way, but the seventh and other less recently used windows don't follow the same rules. Instead they get grouped together according to their application, but disregarding whether they were recently used or not. This new behavior is mentioned here. I am very used to the old way of cycling and the new system is driving me crazy. I tend to have 20 or so windows open at one time and I frequently need to alt-tab to the seventh or eighth window on the stack, but it doesn't work the same any more. How do I put back the old behavior, so that Alt + Tab + Tab + Tab ... goes through the whole list in most-recent to least-recent order?
How to speed up rsync between two local disks?
I'm running rsync to sync a directory onto my external USB HDD. It's about 150 gigs of data. 50000+ files I would guess. It's running it's first sync at the moment, but its copying files at a rate of only 1-5 MB/s. That seems incredibly slow for a USB 2.0 enclosure. There are no other transfers happening on the drive either. Here are the options I used: I'm running Ubuntu Server 9.10.
VirtualBox to use dual monitors
I am running Kubuntu Hardy Heron, with a dual monitor setup, and have VirtualBox on it running Windows XP in seamless mode. My problem is, I can't get VirtualBox to extend to the second monitor. How can this be achieved?
Go back to previous directory in shell
Is there a way to go back to previous directory we were in using bash,tcsh without using pushd/popd ? I'd like to type something like "back" and got returned to the previous directory I was in. Edit: "cd -" works, but only for current and previous directories. Is there anyway I can go back to the previous previous previous directory like how you can go back in the web browser? Regards
Kill a process which says "Access denied"
I have a process that I can't kill with either Task Manager or Process Explorer - I get the error "Access denied". The process isn't a Windows executable. How can I kill it? Is there some tool I could use to override this protection? I'm using Windows 7, 64-bit edition.
how to run a powershell script as administrator
On my Windows 7 Desktop, I have script.ps1, which needs admin privileges (it starts a service). I want to click on this script and run it with admin privileges. What's the easiest way to accomplish this?
What's the equivalent of Linux's updatedb command for the Mac?
If I want to use the command on a Linux machine, I usually run first to update the database. I can run the command on OS X 10.5 but I can't find . What's the corresponding updatedb for the mac?
How to match whitespace in sed?
How can I match whitespace in sed? In my data I want to match all of 3+ subsequent whitespace characters (tab space) and replace them by 2 spaces. How can this be done?